Yep, on older phones it was certainly possible without an Internet connection.

On the Nexus 5, you could just `fastboot oem unlock` right out of the box, install TWRP (custom "recovery") and install CyanogenMod/LienageOS, without ever booting the stock ROM.

On my Moto G4 Play and Moto X4, you had to get an unlock code from the Motorola website (based on the phone serial number I think) and waive some warranty terms, but once retrieved at least the phone didn't need to be online to unlock the bootloader.

The process on the newer Pixels is disappointingly intrusive, like basically everything Google has done for the last decade.

I misspoke when I said Android 7+, my apologies; I was thinking of my Pixel 7, which runs Android 13.

If it is any consolation it became intrusive on pretty much every single brand nowadays, if they at least offer bootloader unlocking option.