Quick answer. Apple does not sell Mac OS. They let users upgrade for free, which means that Apple owns the Operating system. When you give up your Mac, you are giving up your right to use the Operating system Apple is giving you and updating for free.
Back when OSX costed money to upgrade, I don't think it was "Illigal" to put OSX on a non Apple Computer. I don't think it is actually, "Illgal" now, but oh well. I had a Hackentosh on my Dell and hated it because it was laggy and didn't run properly. But that couldn't have been my lack of understanding on how to properly install it.
Back when OSX costed money to upgrade, I don't think it was "Illigal" to put OSX on a non Apple Computer. I don't think it is actually, "Illgal" now, but oh well. I had a Hackentosh on my Dell and hated it because it was laggy and didn't run properly. But that couldn't have been my lack of understanding on how to properly install it.