Often this came from corporate policies where inventors are usually given a small financial bonus to thank them for creating IP for the company, but bosses try to limit that to only the key inventors, whereas often quite a big team of people played a role in the invention.
Well, enforcing the true inventor rule came from the big companies to protect themselves against such bosses, to make sure such bosses wont extinguish all the inventive potential in their subordinates. Because the whole company (and their owners) would be the ones financially suffering the most from that.
Putting too many names is not good either - as a name of someone presented as inventor makes the patent void, if he didnt contributed to the inventive part. Doing verification or other supportive work does not count, anyones name should be linked to at least some part of the invention (part of a claim,...).
But proving this type of wrongdoing is nearly impossible, if all the listed ones cooperate. And they have the strong benefit to do so - because when the patent fails because of this, there is usually no bonus for anyone, so all know better to not complain too much.
Other story is, if a real inventor is omitted - then he has strong motivation to be there and loses nothing by bringing it to the "daylight"...