First of all, the idea that manufacturers have the incentive to facilitate the sharing of lenses is not exactly economically sound from the manufacturer point-of-view: they would rather hope that one is locked in a given system (obviously customers hope for the opposite).
Second, different mounts arise from history: there are various tradeoff to be made, different technical choices and the need to remain more or less backward compatible with one own lineup (so that you can mount any EF lens on an EOS camera, even if it was designed 30 years ago: at the same time note that, e.g., older Canon lenses do not work on EOS cameras because in 1987 a new, backward incompatible lens mount, was designed). I mention Canon because it's the one that I know better, but take thas as an example only.
As a final note, some manifacturer actually share lens mounts (witness M42 for example) or is it possible to use adapter rings to achieve compatibility to some degree (to mount a M42 lens on a Canon camera, for instance, maybe losing the autofocus capability).
PS: for an interesting take on the M42 mount, read this answer.