It doesn't bypass my hosts file... I have a couple of locally hosted websites that I have rules in /etc/hosts for, and Firefox resolves them correctly even with DOH enabled.
It's not, Firefox will still check your hosts file to see if it can resolve that way. DoH is used only if using a local-only resolver doesn't work to my knowledge. Otherwise stuff like SMBIOS, Avahi/ZC or mDNS would break too.
It doesn't bypass my hosts file... I have a couple of locally hosted websites that I have rules in /etc/hosts for, and Firefox resolves them correctly even with DOH enabled.