That said, this was an Academic study, presumably funded at least in part by the University, and therefore subject to approval from an Institutional Review Board (IRB) [0]. Granted it was not an American university, so perhaps no IRB exists. And it was a small study by a group of graduate students, which seems unlikely to be subject to as much scrutiny as a study officially funded and endorsed by the university. However, this is no excuse for circumventing research ethics. To quote the wiki article, "a key goal of IRBs is to protect human subjects from physical or psychological harm," which implies that moral arguments should hold at least as much weight as legal arguments when considering the potential impact of a study.
It's entirely possible for a study to be legal, but immoral. Since this study came from a university, any moral argument should be as valid as a legal one. The trouble seems to be that nobody heard any argument, moral or legal, before approving the study.
In this case, the failure seems to lie with the Danish University, who allowed its graduate students to conduct a study without consultation from an IRB or any kind of ethical oversight committee.
Interestingly, the data is "public," in the sense that anyone could replicate this study with some Python and OkCupid accounts. So even if researchers are stopped by an IRB from collecting the data, that doesn't mean another entity can't do the exact same study, free from any procedural impediments. So it makes you wonder about the premise of questioning the study in the first place. Perhaps a better use of this soapbox, instead of lambasting the researchers, would be to raise awareness of the fact that what you put onto the Internet is public.
[1] https://en.wikipedia.org/wiki/Institutional_review_board