Or Bob's kids are dead and they remind him of them, in a good way.
Bob is a member of a profession that ideally would necessitate him being a Friend to All Children, such as a teacher, a pediatrician, or a pediatric counselor.
Bob has kids himself, so this makes him more sympathetic to other people's kids.
Bob had Abusive Parents, and so he now goes out of his way to be nice to kids, whether they're his or not.
Bob is a Child Hater and is portrayed as being evil for it.
Bob is a Nice Guy but children don't seem to take a liking to him.
Bob, a kid, is established as a good person because of his fondness of adults.
Subverted: Bob is constantly seen playing with children, but that's only to earn their trust so he can sacrifice them to a child-eating demon in exchange for power and wealth.
Double Subverted: But it's actually a ruse to lure the demon out of hiding and slay him once and for all to keep his beloved kids safe.
Parodied: Bob is a babysitter by day and a Vigilante Man at night.
Zig Zagged: Bob loves children, but pretends to be a Child Hater so he doesn't look weak. Children remind him of his own dead son, but sometimes the memories make him angry, causing him to actually hate children for brief periods, and even lash out at them verbally or even physically. But he always instantly regrets this.
Averted: Bob doesn't treat kids any differently than how he treats anyone else.
Enforced: "Bob seems like too much of a sociopath. Give him a soft spot for kids."