To be fair it depends on the manufacturer. There are some manufacturers that will honor your warranty despite flashing a rom. I believe at one time Sony was one of the manufacturers that may have been ok with it for some of their phones but I honestly would not test the waters.
Personally, like most, I do not think a manufacturer should make a bid deal about it but to be fair since they heavily cracked down on it, I am thinking they cut down on some of the warranty issues as a result of someone soft bricking their phones.
I remember on here the panicked people who would soft brick their phones and would look for us to help them come up with excuses to help get an exchange (vs trying to fix it). I am not talking so much about bricks from locked bootloaders I am referring to back during the droid days where the phone was wide open.
With Google and other phone manufacturers coming up with a better UI experience than what you can get with ROMs (minus the hassle of stuff not working and having to constantly flash a new ROM), there are few reasons to rom except if you have a phone where the manufacturer is no longer supporting the device.
Anyway I am getting off track. But as a rule of thumb we always recommend if you are having a potential hardware issue you want to stay stock or get back to stock. It keeps the manufacturer from blaming the software for the issue, despite it clearly being a hardware issue.