The Cambridge dictionary defines middle class as :
"a social group that consists of well-educated people, such as doctors, lawyers, and teachers, who have good jobs and are neither very rich nor very poor:
"The upper middle class tend to go into business or the professions, becoming, for example, lawyers, doctors, or accountants."
It defines class as: "a group of people within society who have the same economic and social position."
The upper middle classes traditionally sought out professions which gave them status and respect within society by virtue of their profession. They generally had careers which required them to work closely with the upper classes and be in a position where they had to be deemed trustworthy, because they were responsible for maintaining the health and wealth of their "betters," without getting to join them. They had skills difficult to gain and maintain, making them of higher status than the working classes, who couldn't afford to gain them in the first place - and wealthier. They could only maintain their position if they maintained their reputation as clever, trustworthy and discreet, so it was in their interest to develop their own set of customs and behaviours to mark themselves out.
Obviously, social class structures have changed a lot over the years, but some of the vestiges of the old ideas remain, whether people like it or not. People still respond, like Pavlov's dog, to some of the signifiers developed by the middle classes to identify themselves, even if the person affecting them is not technically middle class.