I mean, why would I ever unlock the bootloader if I'm going to keep the stock OS? People don't just unlock the bootloader and leave it there sitting doing nothing 😂
Well depends on why you're unlocking the bootloader. Some people just want root but not necessarily a custom ROM. Though for some phones a custom ROM may be more appealing than others.
Magisk, Revanced using root to simply replace stock YouTube app without having to deal with MicroG, tuning kernel to achieve Moah powa babeh, better battery, etc.
Is there a way to lock the bootloader and keep a ROM different from the one the device shipped with? Or do I need to relock and reunlock every time I need to update the custom ROM, with all the data loss this implies?
Is there a way to lock the bootloader and keep a ROM different from the one the device shipped with?
That might depend on the device. I used to tinker and switch a lot, but haven't in years. I do however have GrapheneOS (which is not a ROM, but "a privacy and security focused mobile OS with Android app compatibility developed as a non-profit open source project") on my Pixel and it gets regular updates. Most times weekly/every-other-week, but at worst monthly with the monthly security patches, often before Google releases them...all with the bootloader locked, per GrapheneOS' recommendation.
I say all that to say...not 100% sure outside of my personal and recent experience with GrapheneOS on Pixels, and I haven't had enough coffee yet to do research into phones I don't have.