Legally speaking, only people who actually worked on the invention can be on the patent. I believe (not a lawyer) that including extra people can be grounds for invalidating that patent. However, this does still get abused; Elizabeth Holmes was on many of the patents filed by Theranos.