Marx never once said that the bourgeoisie cannot exist under Socialism. Marx said that Communism, which is after the transition from Capitalism to Communism (which Lenin and other Marxists post-Marx call "Socialism"), is the means by which to sublimate private property (and therefore eliminate class society once and for all). Here's a line from the Communist Manifesto:
We have seen above, that the first step in the revolution by the working class, is to raise the proletariat to the position of ruling class, to win the battle of democracy.
The proletariat will use its political supremacy to wrest, by degrees, all capital from the bourgeoisie, to centralise all instruments of production in the hands of the State, i. e., of the proletariat organised as the ruling class; and to increase the total of productive forces as rapidly as possible.
This phase is described by Marx as such in Critique of the Gotha Programme:
Between capitalist and communist society lies the period of the revolutionary transformation of the one into the other.
Marx stated that the job of the Proletarian state is to gradually appropriate Private Property and to fold it into the public sector. Why? Well, here's an example from The German Ideology:
We shall, of course, not take the trouble to enlighten our wise philosophers by explaining to them that the “liberation” of man is not advanced a single step by reducing philosophy, theology, substance and all the trash to “self-consciousness” and by liberating man from the domination of these phrases, which have never held him in thrall. Nor will we explain to them that it is only possible to achieve real liberation in the real world and by employing real means, that slavery cannot be abolished without the steam-engine and the mule and spinning-jenny, serfdom cannot be abolished without improved agriculture, and that, in general, people cannot be liberated as long as they are unable to obtain food and drink, housing and clothing in adequate quality and quantity. “Liberation” is an historical and not a mental act, and it is brought about by historical conditions, the development of industry, commerce, agriculture, the conditions of intercourse...[There is here a gap in the manuscript]
In short, the job of Socialist society is to immediately sieze large and key industries, and gradually appropriate industry and sectors that grow over time. It isn't an instantaneous transformation into Communism, there is a protracted period of sublimation of property relations as the material processes develop and give way to socialist relations.