And neither would anybody else. That's the problem. (i.e. they'll do something else besides write and debug code to farm stars)
Let's say I determine (or at least believe) that the GitHub algorithm prefers projects with a README with lots of images and emoji, MIT-licensed, and lots of forks.
Obviously, there are already some really great projects out there that have exactly that! The problem is that now I'm incentivized to do those things as well, even if it doesn't always make sense. Sure, I might not create actual spam, but I might choose a license based on partly on that. Or I might inflate my README with an unreadable number of images. After all, my project is pretty important -- if only I could get a few more people interacting with it.
And of course, there's outright abuse. Maybe I'm desperate and build a bot that creates a bunch of forks.
The point is that it doesn't always require the latter scenario when there's also the former. Sure, it's not as bad, but I expect there to be more cases of it, and those cases are harder to determine and retroactively fix.