The first research on this initiation effect was done by Elliott Aronson at Stanford University in 1959. Aronson set up three initiation scenarios (severe, medium and mild, although the severe was not really that severe) and randomly assigned people to the conditions. He did indeed find that the more difficult the initiation, the more people liked the group.

https://www.blog.theteamw.com/2011/03/08/100-things-you-should-know-about-people-75-the-more-difficult-something-is-to-attain-the-more-people-like-it-2/