In Marxist terms, there are two classes, which is bourgeoisie and proletariat. Basically, bourgeoisie own capital controls the means of production as a source of income (meaning the means to produce things, such as a coal mine, which is a means to produce coal), while the proletariat works for them for a wage as a source of income. Petite bourgeoisie are for those who both work for a wage and own capital as a means to live (such as shopkeepers, artisans, etc).
The joke here is that the term “petite” also has a different meaning.