Extrapolating your answer, Most mechanical engineering firms are not in the same areas as the cheap houses. So on your point, most mechanical engineers cannot buy a house that they can live in and get to work.
Most people with an engineering degree are probably in a relationship, so they don't need to buy a house on a single salary.
There are plenty of houses for sale below the average price, just as there are plenty above.
Buying isn't necessarily the best option anyway. House price returns in the UK are somewhat below stock market returns, so as a pure investment it doesn't make sense. Unfortunately, we have the narrative in the UK that we should aspire to own houses, but that doesn't mean it's necessarily correct!
Over half the UK adult population is married. According to the ONS, 61% of the population aged 16 or above is living with a partner. [1]
Unless the demographics of those with engineering degrees is significantly skewed towards singles, this feels like a very valid assumption. Of course, you might have access to better statistics by profession.