Why is the Grievance Studies affair considered to be research requiring IRB approval?
This article in NYMag answers pretty clearly most of your questions. I won't quote it all, you can read it on your own. Here are relevant excerpts.

For the purposes of Peter Boghossian’s case, three facts about IRBs matter a great deal: “study” is defined rather broadly in the federal guidelines; possible risks to humans — even ones that non-IRB nerds may view as negligible — are taken very seriously; and IRBs tend to look especially closely at studies involving deception. [...]
First, the definition of “study”: As PSU explained to Boghossian in a document it sent him December 17, the university determined that his work met the definition of “study” as defined by the Department of Health and Human Services in language that reads — this isn’t included in the letter itself — “a systematic investigation, including research development, testing and evaluation, designed to develop or contribute to generalizable knowledge.” [...]
Crucially, it does not matter that the hoaxsters didn’t attempt to publish their final results in a peer-reviewed journal. “Publishing in a magazine that’s not peer reviewed doesn’t matter if they’re reporting on their research,” said Celia Fisher, director of the Fordham University Center for Ethics Education. All that matters is that Boghossian is an employee at PSU, and that he conducted what the university deemed to be human-subjects research based on a plain reading of how that term is normally defined for this purpose.
[...] First of all, “if they believed that this was not human-subjects research, the process would have been to submit to the IRB an application that says I believe this research that I’m doing is exempt,” said Fisher. “And the IRB makes the determination if it’s not human-subject.” It’s not their call, in other words — it’s still the IRB’s. [...]
In the case of the grievance-studies hoax, the potential for harm came in the form of reputational damage and humiliation to journal editors and reviewers. And one decision the hoaxsters made — allowing accepted papers to actually be published rather than notifying the journals so they could be yanked before they were out in the world — neatly captures the sorts of ethical discussions often spurred by IRBs. [...]
Finally, as a so-called audit study [...] Boghossian, Lindsay, and Pluckrose’s scheme was more likely than a non-deception study to raise IRB eyebrows. “All audit studies require deception, and many social scientists who would like to see only a limited role for IRBs still consider IRB review appropriate when deception is required,” said Schrag. Deception is simply seen as an ethically fraught tactic, so even IRB critics aren’t necessarily in favor of them backing off entirely in situations where deception is involved. [...]
Pluckrose at one point mentions the impossibility of getting informed consent from journal reviewers — the implication being that to do so would be to blow the cover of the experiment. Again, though, that’s the point of an IRB: to gain permission to deceive, or to come up with some sort of work-around. The choice isn’t necessarily between obtaining informed consent in a manner that would blow the experiment and not running the experiment at all — plenty of IRBs have approved plenty of audit studies. [...]

The article was not particularly difficult to find (it was linked in one of the Wikipedia articles), and the way you phrased your questions casts some doubt about your good faith (it sounds like you have already attained a conclusion and only wanted validation, especially your last hypothetical question), but still, I think this deserved a good-faith answer. Now as for your hypothetical:

As an extreme example, if a university professor tells their colleagues a joke and counts how many people laugh, and later writes a post about it in social media, do they risk similar sanctions if the university doesn't like their post?

This is a systematic (albeit small scale) investigation designed to contribute to generalizable knowledge and the professor reported on it. It involves human subjects. If the professor doesn't inform the participants that their reactions are recorded and will be posted online, it also involves deception. I will let you reach your own conclusions as to whether it would require IRB approval. It sounds like you understood extremely well what especially was problematic with Boghossian's study, as you were able to construct a completely different hypothetical scenario that still presents the same three red flags.
You may find all this overblown or too cautious. But it isn't up to you (or a researcher carrying out an experiment with ethical ramifications) to decide. A researcher has a conflict of interest: it is in their interest that the study is carried out and completed. It is the role of the IRB to offer an external evaluation of this, to remove the conflict of interest. If the experiment is truly worth the risks, it will be approved.