As you observe, this is an episode in a long fight, and while there has certainly been long blood between the military and the Brotherhood in Egypt, it really does go beyond that. Islamic societies in the Near East particularly have faced, since the first serious colonial intrusions in the nineteenth century, a struggle over to how to react to the evident fact of their weakness relative to Christendom, the European powers, the West, call it what you will, from the start and down the years. It is a thing made all the more bitter by the conviction of inherent superiority which is a strong motif in Islamic history and a notable feature of its doctrine. One strain of thought, obviously, has been to imitate the West, to do what it has done, and this line, from the late nineteenth century, has given rise to various nationalist, secularist, and modernist movements. Another line has held that re-assertion of fundamental principles, return to the old ways towards which the deity manifested favor, is the only solution, and within this line, there has been a further split, between those who feel that some Western elements can be adopted for use without entailing the full corruption of the West, and those who feel that anything beyond the purely mechanical must be rejected entire of the deity's favor is to be achieved.
It is an odd feature of history that when societies find themselves at the sort of disadvantage those of Near East found themselves at relative to European powers in the nineteenth century, it is often the military which emerges as the champion of progressive development. This is because, when a society is in a pre-modern, semi-feudal state ( which the Near East was under the rule of the Ottoman in the nineteenth century ), just about everything from improved routines of taxation and increased economic activity to better education and sanitation and improved farming methods, will redound to an increase in military power, translating directly into better soldiers and better weapons for them, and better means to assemble and move them.
Thus the military of a country has often been the spearhead of what a Marxist would refer to as 'the social revolution', the revolution that overthrows a feudal order, a theocratic order, and establishes a modern order, or at least a more modern order, on bourgeois or capitalist lines. A degree of social liberalization is often the accompaniment of this movement, though its authors frequently have no particular interest in such. For however much military elements may see the benefits of social progress for the efficiency of their trade, and so in some circumstances will take very advanced positions on matters economic or industrial or educational, it is also true that military leadership tends to hold extremely conservative views where social and cultural mores are concerned. It is this duality, of desiring some of the fruits of modernity while abhoring others, which ensures that this sort of 'military progressivism' generally produces a social order in which individual liberty and expression meets many restrictions on a personal and political level.
In modern Egyptian history, the military has played this role of 'vanguard party of the social revolution'. In doing so, it was opposed by not only the colonial power of England, and its late puppet, King Farouk, but also by the political and social elements which believed the proper balance of power between Islamic societies and the modern West could only be achieved by re-assertion of the fundamental practices of Islam itself, that the weakness of the place owed not to any flaw in or failure of Islam itself, but to the corruption of Islam, and the backsliding from its ways, which had set in since the glorious days of its foundation, when Islam had swept all before it and been the apex of civilization. While this conflict was pressed with arms from the Islamic side, it would not have to be so pressed to still represent a deadly and irreconcilable conflict with the line see by military leadership as best for its power and the society it was rooted in.
I expect there may have been some brief period after Mubarak's ouster when the military leadership, or at least elements in it, thought some commonality with the Moslem Brotherhood might be managed, since the two parties are in substantial agreement on questions of social and cultural mores. But this cannot have lasted very long, as the commonalities are surface things, and the conflicting elements lie deep in the nature and direction of the two forces.
What we are going to learn as time goes by is which side of this has correctly assessed its actual strength, and which side has over-played its hand....