The pre-Musk behaviour was fairly straightforward to my recollection: All logged out accounts could view a single tweet and some percentage of the replies. They could also view a profile but, similarly, scrolling down a certain number of tweets triggered the modal.
It was a good compromise.