In mainstream economics it is treated as just another good, such as break or milk, but somehow it behaves differently. The dynamics of the market are driven by monopoly pricing and mortgage and rent are paid more like a tax than a payment for a yoghurt that you can choose not to buy or buy an alternative. You can't choose not to be housed.
Since its monopolistic nature the house/land market works like a gravity for excess money and endless bubble which keeps inflating and bursting forming a housing cycle, which many confuse with a business cycle.
Real estate is literally where money go to die. Excess money or surplus and corrupt money gets parked in it and unless additional money is used for repairs it actually loses value. It acts as a sink of money flow in the economy.
Classical economists in the 19th century were actually aeare of this. Ricardo and his law of rent actually really describes what is going on with the economy. It explains what wages even mean, instead of just payments for work, based on margin of production. It's actually one of the few law of economics which actually behaves like a law of gravity in physics, being consistent globally, unlike the rest of them resembling the theory of epicycles.
Since the marginal revolution housing, land and rents were abstracted away and economics started resembling some mathematical system for an imaginary game world with researchers being drowned in neverending epicycles.
If the theory doesn't model land and house speculation then it will fall into the same traps and will be chasing parameter tuning to ever more complex equations forever since it will never understand the actual money flows in the economy.