The context menu key – along with the Windows keys – is the most recent addition to the PC keyboard. The Microsoft Natural Keyboard, released ca. 1994–1995, was the first one to include them "for future uses".
That "future use" was the UI introduced with Windows 95 – the first to make heavy use of context menus. The latter were around in previous versions of Windows but not used very widely, which changed with Windows 95 introducing a new "object-oriented" user experience. (It was also the first version to have the start menu as we know it today – Windows 3.0 to 3.11 and NT to 3.51 had a separate application called Program Manager instead, and before that, in the days of Windows 1 and 2, one would launch apps through the file manager, then known as the MS-DOS window.)
While the Windows key was adopted quickly and is seeing widespread use, possibly owing to the number of shortcuts relying on it, the context menu key has always been a niche thing. The Windows UI is built mostly around the mouse, and the context menu key is a direct replacement for something that, except for a few special cases, can be achieved with the mouse at the same speed. Therefore, when keyboard manufacturers try to shave off some real estate to make their product more compact, this is the first candidate.
As for the different layouts: the layouts show in the question are compact layouts, where a major design goal was to reduce the overall keyboard dimensions over the standard layout. As far as I can tell, the majority of full-size keyboards still follows the same uniform layout. That layout goes back to the original PC/AT spec by IBM. Much of the success of the PC platform is due to the fact that IBM opened up its specs and allowed other manufacturers to sell PC clones. The keyboard got cloned along with it, and manufacturers were probably even reluctant to mess with it (it might have caused customers to stick with IBM rather than switch to their clones).
Laptops as we know them today entered the field later, and it was only then that a major drawback of the standard PC keyboard became apparent – dimensions. So laptop manufacturers tried to shrink their layouts by rearranging keys, introducing the Fn key for overlaying infrequently used keys on top of more frequently used ones, and in some cases even dropping keys. By the time this happened, however, there were already a bunch of PC manufacturers in the market, so these layouts had no "common ancestor" other than the standard keyboard. As a result, there have always been multiple compact layouts from the very beginning.
At some point keyboard manufacturers began to realize that even some users of desktop computers had a demand for small keyboards – the compact keyboard was born, essentially a laptop keyboard that would plug into a desktop computer. And the proliferation of layouts continued. I can think of three main reasons why keyboard manufacturers are unlikely to ever agree on a single compact layout: First, the whole overhead of reaching a consensus among all major vendors. Second, there will likely be a lot of disagreement over which keys are more or less frequently used, or what the best place for which key is (and different options may be best for different groups of users). Third, since the business is no longer about taking the cake from one dominant vendor (there are plenty of players in the field by now), manufacturers may well use their own layouts as a kind of lock-in – people will stick with their brand because they have gotten accustomed to the layout.