...How are a jester and a Bomb useful to the town? A bomb is usually not with the town, right? They could be just as useful, if they manage to take out Mafia or third Party. And a jester wouldn't be beneficial either, even if we would want them alive. They are third party, after all.
I'm pretty certain that the Bomb is usually a role aligned with the Town, as an attempt to make the Godfather think more carefully. If they were third party, how would they win? All they could do is lay low and hope not to be killed, which in my opinion would be a stupid thing to do because it encourages them to be fairly inactive.
The Jester role is usually inactive, but they have two options, win with the Town or win by themselves, which involves getting themselves lynched. Therefore, you don't want to Lynch the Jester.
The point is, if you lynch the Jester, you automatically lose the game. Do you want that? Likewise, when you lynch the bomb, someone is going to die with him. We don't want that either. In other words, we need to avoid the Jester and Bomb, not kill him/her. Thus beneficial to us to keep him/her alive.
So basically, this is what I am trying to say. Although the Bomb is usually activated by being nightkilled, but there are variations. Anyway, you don't want to make the Mafia think that there is a Bomb as they will try and get the Bomb killed during the day, thus making the night period safer for the Godfather. You want the Godfather to accidentally hit the Bomb during night, thus killing himself.
Finally, think about it mathematically. In theory, any third party wants to work with the Town to kill off the Mafia to increase their chances or winning to a maximum. An upside to this is that the 3rd Party counts as an extra man. Say there were 4 Mafia and 7 Town, plus a third party. For the Mafia to win, they have to kill off 4 people, not three. And if the 3rd party is a role such as the Serial Killer, then the Mafia have to kill 5. So really, it works in the Town's favour overall.
Plus they make it harder for the Mafia to win. A really good example of this was in Batman Mafia in which the Serial Killer was helping the Town by trying to kill off the Mafia instead of aiming to kill any power roles which were a threat. By doing this, the Mafia's victory was put off for several weeks.