Unsafe, most likely. Especially considering that some communities are reluctant to help you when something goes wrong. Even witnesses of a crime will act like they didn't see anything.
But I doubt it's unprofitable (maybe as a consequence of it being unsafe though). Quite sure there are people willing to pay top dollar for an Uber in these areas (also considering that Uber drivers may actually reside in these neighbourhoods).
Lupe Fiasco made a song on a similar topic touching some of the reasons why it would be the case that some areas get excluded from service.
https://www.youtube.com/watch?v=R40DFzvbMtE