Almost none of what you talk about in the real estate transaction requires a lawyer, at least not in most states. I’ve never had an attorney representing me in a real estate transaction, and the only time I had to face one was because the condo I was purchasing was owned by an estate being settled.
Which is not to say attorneys aren’t involved in the real estate field, just that the common aspects of changing ownership don’t require attorneys.
The vast majority of attorneys are involved in some way with the corporate world. They advise corporations, or they work for corporations (including, for example, staff attorneys for insurance companies). It’s business law that drives the high number of attorneys, not the needs of the populace in general.