The reason for those headers being present is debugging. A full path trace helps
MTA and
MDA admins understand, what is happening in the case of problems. Whether nowadays including the path beyond the initiating MTA is useful is debatable. Majority of the end users became too ignorant to be of any help, so MTA operators are the last useful link. If they need more details on the actual sender, they can log the relevant information locally. Email, similar to other internet technologies, was also developed in an environment valuing coöperation, competence, and mutual respect. Confronted with a world, which treats even communication as a liability to be minimized in the balance sheets, some features start making little sense. This is one of them.
As for the risks: to nearly all people revealing an IP address is of no risk.
(1)From security standpoint: IP addresses are public, necessarily exchanged in open form, and collectable or even associable with an individual through effort much smaller than people expect. If not already catalogued enough, in the 20s scanning the entire IPv4 range for a selected vulnerability is completed within minutes using resources available to a script kiddie.
Which makes “leaking” that information not completely irrelevant. I want to be clear on that! But much, much, much less important than people would believe.
Privacy is a bigger problem. But leaking that through email headers is also of minor importance, compared to extreme level of surveillance through other means. My personal preference is to have those stripped. But only because I believe in the privacy by default approach. Not due to any particular, major threat.
Geolocation works very well. It can narrow down the address to at least a single district or a town. The thing is: you need to buy that information. Public databases became quite useless after IP address leasing and anycasting became commonplace.
(1) The few exceptions include vulnerable groups and people engaged for illegal activity. And people, who made the above claim on the internet. Because there is always some dumb kid believing they “prove the point” by causing nuisance.