Greetings! A most interesting query you have posed here, and once which I have certainly yet to encounter in any textbooks thus far. It certainly is a fairly novel reason beyond the somewhat reductionist "MAIN" causes (an acronym most textbooks resort to, standing for Militarism, Alliances, Imperialism, and Nationalism). It's also a reason which has not been covered quite so extensively in historiographical writings yet, so we are operating under a drought of secondary sources here. Nonetheless, let's see what light I can help to shed on the situation.
The short of it is that fear of the socialist revolution never seized a belligerent nation in 1914. Whilst there had been several labour-related protests by Workers Unions across Europe prior to 1914, the actual opposition they posed to the war was somewhat varied depending on their own views to the reasons for conflict. On one side of the spectrum, the Social Democratic Party of Germany (SPD), the strongest and most influential labour party in Europe, suspended its conflicts with other Reichstag parties in what was known as the Burgfrieden (party-truce), declared by Kaiser Wilhelm II himself on August 2nd. On the other side of the spectrum, the Italian and Serbian labour representatives firmly rejected participation in the war by a clear majority vote in their respective parliaments.
Many historians writing on the labour movements' attitudes towards war actually note similar themes: the 'compatibility' of nationalistic patriotism with the objectives of the labour front. The idea of fighting for one's country against a foreign threat seemed to resonate with many workers, who also saw the political value of their participation as soldiers and wartime labourers. Please excuse the use of a tertiary source, but this extract from a fairly comprehensive article by James Thompson sums up this phenomenon quite well:
"For many members of European labour movements, a form of labour patriotism saw support for the war effort as crucial to maintaining, and advancing, labour’s place within the polity, while conversely viewing political recognition of labour’s due as essential to the successful waging of war."^([1])
Megan Trudell, writing in a more politically-biased article for the International Socialism journal, frames the enthusiasm of the working class for the war as a product of government propaganda, writing:
"In part this enthusiasm was a response to ruling class propaganda about the nature of the war. Every ruling class involved argued the war was one of national defence. Germany was defending itself from Russian aggression, France from German militarism. Britain was defending 'poor little Belgium'. Each ruling class pushed the idea that there was an outside threat to the democratic rights enjoyed by the nation's citizens, and in part the response of each country's working class was an identification with one's nation and a desire to protect one's way of life."^([2])
As a result of this wave of support from labour movements, which admittedly did not occur to the same degree in all countries, the governments saw no need to take it into consideration when considering whether to get involved in the war. Instead, and perhaps rightfully so, their thoughts were focussed on the geopolitical reasons for their nation's involvement in the war. To shamelessly plug some discussions related to those reasons (and the "other causes" for war), here are a few that I have weighed in on as well should you be interested.
Hopefully this minor overview has helped answer your question, if in a limited sense, and feel free to ask any follow-ups as you see fit!
Sources:
[1]: Thompson, James. "Labour Movements, Trade Unions, and Strikes". Written April 19, 2017. Accessible online here. (This tertiary source contains a bibliography with further readings which might help direct your investigations on the matter)
[2]: Trudell, Megan. "Prelude to Revolution: Class Consciousness and the First World War". International Socialism no. 76 (September 1997). Accessible for free here (note: heavily biased source, as the journal is itself the publication of the Socialist Worker's Party of Britain, but does contain interesting primary quotations on the matter).