Before to legally play it you had to create a Mojang account and before that you had to make a Minecraft account. Minecraft has always required an account.
Previous accounts trusted you at your word/cc regarding who you are.
Quite a few of us migrated to ms accounts, only to get blocked and the minecraft username/account ransomed until we gave Microsoft our mobile phone numbers due to "suspicious activity".
Said activity being signing in to the launcher post migration....
Yes, that's true, but you no longer get session cookies for authenticating your username -- you always play "offline". Though I'm glad it's still possible to play the game with the official launcher with mojang login (I mainly use polymc to start the game).
Yes, polymc supports mojang login. This patch [0] I tried to use to bypass login did not work -- I have to login with mojang to start the game on polymc.
For multimc there's a fork called ultimmc that allows playing without an account.
Some servers do not require authenticated accounts and work in so-called "offline mode" where authenticity of usernames is not verified with mojang servers (created for playing on a LAN). Many servers on the other hand require usernames of connecting clients to be verified -- and this does not work anymore (at least for me) with the mojang login. wiki.vg has a large repository of minecraft protocol descriptions: [1] and [2]
It was free to play the game before indev, which was before infdev, which was before the alpha. This older version of the game remained on the site as a demo, but it still required you to sign in for multiplayer.