Bob is a total Jerkass. He's the type to knock a guy down and kick him when he tries to get up, the type who'll bed a girl then toss her aside. Just ask anyone. Bob's a guy you do not mess with. Come to think of it, just ask him. His "rep" is such that he's a slave to it. And for a guy like him, stuff like that is what makes others fear and (sometimes) respect him.
So why is a nice girl like Alice with him? Well, Alice knows of a different side, one where he's always nice to her when they're together; she's seen him do a few good deeds when he didn't know she was watching. Like reading to orphans, making donations to charity, or just plain helping others. Thing is, eventually Alice is going to confront him about his true self, call him out for his crime of... kindness.
He'll acknowledge it of course, reluctantly, only to threaten grievous bodily harm on Alice should she breathe a word. But the secret will be out. Even if Alice tells no one else, it will mark a milestone in the Character Development of both, and viewers will be better able to sympathize with him. Especially if he's a Sergeant Rock.
Compare Villains Out Shopping, Think Nothing of It, Peer-Pressured Bully. Contrast with Affably Evil (which is an evil character that isn't truly mean or "evil"), Jerk with a Heart of Jerk (when the "heart of gold" turn out to be "fool's gold"), and Holier Than Thou (where a character firmly believes that they're morally "better" than others). Jerk with a Heart of Gold characters generally have more emphasis on the 'jerk' while still caring.
See also Let Us Never Speak of This Again and Punch-Clock Villain.