Wow, this is a major subject. To really get into it you would have to study the history of each round, where they came from, what their original platform was and so forth.
My "back of the napkin" answer is that intermediary calibers were adopted by nearly all militaries as combat became more and more a factor of volume of fire and which side could keep it up the longest. It became much more effective for an infantryman to double the ammo he could carry in the field while not adding additional weight. Especially in theaters where resupply was not as quick. When my dad was in the army, he was issued an M14, and I believe his load out was 4 magazines and one in the rifle. That's only 100 rounds...standard. Today the "standard" load out I believe is 210 rounds for the M4 style rifles, or more than double. Add on to that extra mags carried and extra ammo carried on stripper clips ect, it means the average soldier can keep going for more than twice as long. A number of vets I have talked to who served in Vietnam were often shooting where they thought the enemy was and as mentioned above, the contact was decided by who could keep firing the longest.
Another small point to consider is that during the Cold War NATO and Warsaw Pact countries were often supplied by either the US or the USSR, so naturally the 5.56 and the 7.62 became the "standard". Growing up one could sometimes tell the "good guys" from the "bad guys" based on if they had an AK or not. So, there is an element of expedience when outfitting multiple fighting forces from around the world to all share the same equipment and cartridges. So, once a caliber was adopted, it became a matter of economy of scale.
I have found it interesting to watch the re-adoption of alternate rounds in recent years as the battlefield has again changed. In Afghanistan some soldiers were struggling with the range of engagements, so from what I was told, the M14 has been brought back for some designated marksmen since it added range capabilities. And the military has spent a lot of time and money coming up with new rounds that made the range less of an issue. Whether it be performance at long range in Afghanistan, or short range house hopping in Iraq.