The first two paragraphs are self-contradictory. You can not simultaneously be a socialist and bourgeois party. Not that the Labour party has ever really endorsed socialism. Adopting the hyperbolic and fear-mongering American terminology of defining the left-wing of the political spectrum really obfuscates matters. The entire platform of post-Thatcher Labour Party can be summarily described as a timid suggestion to somewhat moderate the neo-liberal reforms of the Tories. Corbyn's innovation was to simply dare to radicalise the party's manifesto (at least, verbally, we will never know how sincere he truly was), an initiative which was predictably distorted into a paranoid narrative of Red Menace by the usual tabloid suspects. The procedure is actually very similar to what happened to the Democrats in the United States. After a decisive right-wing turn in the '80s, only now some social-democratic points can gradually surface in mainstream political discourse, as a consequence of the 2008 crash and Bush' Jr. and Donald's comical presidencies. It's really absurd how adamant Blairites like Alan "fat-white-finger-jabbing-blokes-on-rostrums shouting-and-screaming" (so pro-working class) Johnson actually try to label Corbyn's sloppy return to the roots attempt as cultural betrayal.
Therefore, the reasons for the Labours' dismal record in elections are found in their rapprochement with conservatism during the late 20th century. They heavily profited from it, when the economy was flourishing and future prospects looked exceptionally bright, but the harsh grip with reality in 2008 totally undermined this strategy. The Labour Party was also linked with elitist practices and pro-establishment attitude, as their
privatisation and deregulation policies, from the Royal Mail to the Private Finance Initiative (which ironically enough Blaire used as the flagship of his campaign), demonstrated. Corbyn's tactic could actually contribute to reclaiming the old base of the Labour Party, but he essentially committed suicide by refusing to choose a side in Brexit and instead try to pander to both groups.
The segments of the society who suffer the most from the growing income inequality and
desperately believe that the exit from the European Union can miraculously improve their situation accurately perceived Corbyn's duplicity as a treason to his "revolutionary" credentials. Additionally, the increase in political immaturity, the decrease of social consciousness and the erosion of trade unions have rendered workers exceptionally vulnerable to reactionary demagogues, who are generally ruthless enough to sell their fandom for a barony. When you add all these factors and especially Corbyn's absolute embarrassment in front of the Brexit question, together with the internal opposition against him by the Blairite faction, it's not so difficult to understand the reasons for the Labour defeat. The fun is that I strongly doubt about the chances of Corbyn's successor in inspiring the masses, unless Boris manages to completely derail the rather fragile United Kingdom.