Can you buy an Apple system without an OS?
And can you legally run OSX on anything other than Apple hardware?
When you buy a mac it has OS X on it. There's no option to have it arrive without. You can then remove it and install something else if you want. e.g. linux. Although most people recommend keeping OS X as well just so you can get firmware updates.
I believe it's against the T&Cs of OS X to run it on anything other than Apple Hardware. However, you can legally buy a copy of OS X and install it onto other hardware (with some special tools aka hackintosh). People who have hackintoshs haven't necessarily pirated anything.