Well, the problem as usual goes deep into the history of the language. I try to recollect as much as I remember, and if I fail let's other will improve my story. So let's begin in the beginning.
Once Russian nouns had 4 types of declension, but nowadays there are only 3 remaining. As the consequence of this shift some nouns got 2 forms of prepositional case - a new one along with an older one. BTW. Prepositional case is the new acquisition in Russian language too. In the old times there was Locative case which was (almost) fully absorbed by newcomer Prepositional.
The biggest part of nouns has now no trace of old Locative. Say, "Я в деле" (I'm in) and "Поговорим о деле" (Let's talk about business) - both are the very same case. But some nouns got two forms which are now used differently (as the old joke says, there's no use of having many clocks if they all show the same time). So consider, "Я в лесу" (I'm in the forest) vs "Что мы знаем об этом лесе?" (What do we know about this forest?). Different forms, different meanings.
How to treat this situation, whether it's a brand new locative case or the special second form of prepositional case, is the matter of agreement. Anyway, one has to know and use it properly. In example sentence, "Девочка сидит на мосту" the bridge surely is a location of a girl, so one should say "на мосту" not "на мосте".