This is not about Oakland's bad rep, deserved or not.
It is about whether or not someone should spend days in a suburban hotel because they are going to a ball game nearby, instead of staying in the middle of an exciting city with countless things for visitors to do, and public transit that will get them to all those places without having to cross the Bay.
If you stay in any suburb or airport hotel, you will spend time and money to get to San Francisco. You probably commute every day for your job. If you want to commute on vacation too, you are very unlike most folks. The wasted time is the issue--do you really want to be on a crammed train or bumper-to-bumper freeway in the morning when you could have gotten up in your San Francisco hotel, looked out the window at the view, and had a leisurely breakfast while planning out your day?
If you're interested in visiting a city, staying in that city gives you the real experience. We call it ambience. You don't just go to it, you're immersed in it. You can go to your room during the day for a rest, a change of shoes, or to drop off purchases. You can stay out late and enjoy dinner or a show or club and not worry about missing the last train back. You can step outside at 11:00 p.m. in some neighborhoods and find an all-night restaurant or store; if you're at Union Square, you can go to the 24-hour Walgreen's and buy your S.F. souvenirs and sit up until 1:00 a.m. writing your postcards home, listening to the cable cars that run until almost 1:00. In many suburban locations, you won't have anything to do except maybe turn on the TV at 8:00. Ho hum.