I've seen this in films and in some books I've read, that houses were placed on the actual bridges in cities like London and Paris. Why do we not still have people living on London Bridge, for example?
They still exist in areas of France and Italy. Ponte Vecchio is a well known example.
Houses were built on bridges when cities were walled in, as it was difficult to expand building space. Once walled cities were no longer a viable defense, cities could grow outward again; so they fell out of favor. The ones that survived have mostly become novelty and been converted to merchant districts, since it's more economically viable.
In Paris, at the end of the 18th century, there were four bridges ("ponts") that had houses: pont au Change, pont Marie, pont Saint-Michel, pont Notre-Dame. The houses had been built there for several reasons, the first one being profit (they were leased). The houses were destroyed between 1786 (pont Notre-Dame) and 1808 (pont Saint-Michel) because the French Revolution had put a temporary stop on operations. The destructions are documented by two famous paintings by Hubert Robert, La démolition des maisons du Pont-au-Change, en 1788 (link) and La démolition des maisons du pont Notre-Dame en 1786 (link).
There were several reasons for these destructions, from what I've read the main to reasons were harmony (on the pont Marie, several houses had been destroyed by a flood during which several people died, and there were wide gaps) and urbanism (the edicts of the king indicate that after the destruction broad sidewalks will be constructed).
Edit: besides people dying in floods, there were also health concerns (for example the pont Notre-Dame had stagnating bogs that reportedly stank), practical concerns (there was not enough rooms to have wide caves so a lot of commercial professions could not settle there) and structural concerns (some arches of the bridges had to be rebuilt after the house's destructions because people had dug caves in the bridges' structures.
Sources:
Les maisons des ponts parisiens à la fin du XVIIIe siècle : étude d'un phénomène architectural et urbain particulier, Youri Carbonnier
Dictionnaire administratif et historique des rues de Paris et de ses monuments, Félix Lazare, Louis Lazare