S-Off has many uses, but it isn't actually needed for installing custom ROMs. And while it makes many things much easier, because it allows you to bypass various safety checks it's up to you, once you are S-Off, to make sure you don't do anything that could damage the phone.
ROMs are device-specific, to the extent that they don't always work between different versions of the same device (e.g. a ROM for the International HTC One may not work on a Verizon HTC One), and they don't work between different devices even from the same manufacturer (a ROM for a HTC One M7 will not work on a HTC One M8, for example). You'll see some ROMs, e.g. CyanogenMod, which are available for many devices, but those have been built separately for each device they support, and if you try to install the wrong build on the wrong device it won't work at all.
So if you are thinking of trying to install a Samsung ROM on a HTC device, just don't even try it. The best that could happen would be that it would fail to install. If you got the ROM installed the best you could hope would be that it didn't do any permanent damage and that you were still able to load a compatible ROM afterwards. There is no way a HTC phone can work with Samsung software, but depending on what you did you could damage the phone trying.