A stock ROM is the ROM that comes with a device; the device is "stocked" with that ROM by the manufacturer.
Stock ROMs doesn’t void your warranty. One of the biggest reasons that people don’t go for Custom ROMs is warranty. Most of the companies prohibit rooting your Android phone or installing a custom Android version – and if you do so, then you can void/lose your warranty.
Trust for Security
May be it feel strange but one can easily trust Android operating system sold by a reputed company. You can be sure that it does not contain any backdoor, malwares, spywares or other malicious tools. I’m not saying you can’t trust Custom ROMs but it’* just that many people take their privacy on top of all other things – you can easily trust a reputed company you know but how can you trust a software or source code of unidentified origin or developer.