Inventorship is not authorship
Authorship credits everyone who did the work and wrote the paper. Inventorship is a legal question under US patent law: an inventor contributed to the conception of the idea in at least one patent claim. Running experiments someone else designed, collecting data, writing, or supplying reagents does not on its own make someone an inventor. An author may not be an inventor, and someone who is not on the paper can be. The patent attorney settles final inventorship when the claims are written.