1- SF is a city with diverse neighborhoods; there are some that are quite safe, and others where you'd be well-advised to watch your back. The crime may appear dense on that map, but in reality, it's not like a stick-up happens every time you set foot outdoors.
2- San Francisco is not the same as the Bay Area. As someone who lives in So Cal, you may possibly think that I live in "San Francisco," whereas I actually live in the East Bay. The Bay Area is a huge, fairly dense populated area. Palo Alto, Berkeley, San Jose, Oakland, Fremont, San Mateo, Marin County—they're all in the Bay Area, but none are "San Francisco".