My tests indicated that the priority was Bomb > No Bomb FIRST. The only circumstance I did not test there was throwing a bomb at minions, having an enemy champ walk in, then throwing another. It did, however, prioritize attaching to an allied champion that already had a bomb on them over an enemy that didn't. I assumed it would work the same with minions, but on second though, I can see why it would prioritize champions over minions that have a bomb. Perhaps that should be tested. All other things being equal, it will attempt to perform the instant damage and stun.
I did not specifically test to determine when the target is chosen, because I assumed it chooses its target on impact. It would seem like it would have to be programmed that way to be dodged. It has a travel time, can be dodged, and can hit a target that walks into the zone after the cast but before the impact. This is why leading the enemy works. That said, if it is ranking enemies by priority as soon as it is cast, but only attaching to one highest in the priority when it lands, that might be able to explain some of these reported bugs. I cannot claim to know anything about the programming, only what I saw through experimentation.