A Stock ROM is what comes pre-loaded in a smartphone from the factory whereas, custom ROMs, thanks to Android's open-source nature, are third-party OSes developed by communities. They're users like us who also happen to be Android developers. Hence, they exactly know what features a typical user would want, and they're added.