Using a stock rom is good coz they can be customized , the Roms used by LG or Samsung are heavily modded for their advantage. They usually take the stock image of Android from Google and then modify it , .
But wat you said is also wrong, cause with slight modifications we can use a Samsung rom in LG phone ,and LG rom in Samsung phone, .
U might hav heard about CyanogenMod , it has basically a tree or branch which has basic codes or structure for a basic rom, you can tweak it however you, . If you basically go in depth about Android , you can see they used Android in project Ara and it had worked perfectly,
So we can you Android as the OS for the phone .