I wouldn't necessarily say headphones are better, but certainly different.
There a various considerations. Among the biggest is the acoustical environment. People building systems often focus on the equipment and in the process minimize or overlook the impact of the room - which creates the acoustical environment for the system. You can have spectacular equipment - equipment that will be tonally flat (accurate from roughly 30Hz to 20kHz), and capable of producing high definition sound with great imaging (side to side and front to back), but if the room is the wrong size, or if the dimensions don't have the right ratios (length to width to height), then some of the frequencies might not reach your ears at the proper time regardless of equipment placement and the seating location within the room. The wrong reflections and absorptions in a room will emphasize some sounds and dampen others which will skew the accurate reproduction of the signal that the equipment may have been capable of playing.
When you put the headphones on you are overcoming a lot of what goes wrong with most rooms so you get a certain realism that is hard to produce with most systems in most rooms. Your mind is so compelled by what is uniquely played back in the headphone environment (when it's done right - not all headphones are done well), that you can forget about some of the qualities that are missing in headphones. You mostly only notice these qualities - which are sonic "cues" to your mind - when you take the headphones off and you listen to a good system in a good room. Headphones can be great, but if I could have the world's best headphones or the world's best system in the world's best room, I'd take the system and the room (unless I could have the 'phones and the system/room). I think in the normal world of music your mind expects verbal cues from the environment beyond what headphones allow. But if the room is giving the wrong cues then your mind gets confused, disappointed, fatigued, etc. - and then it's often more technologically practical and economically affordable to fix the problem with headphones than with a new room.
One of the really nice aspects of headphones (beside the fact that you can listen as loud or as soft as you want and not have to deal with interrupting other people's sonic environment or have other sounds interrupt your listening) is that you can buy almost any headphone for roughly the price of a midrange interconnect cable. It's a lot easier to push the state of the art technologically without going broke - and you don't have to even begin to think about the cost of room design and treatments - which might cost almost as much as a state of the art system, and which is probably needed to get a state of the art system to play to it's potential.
Net, net: great headphones bring you great technology and a controlled listening environment for a fraction of the price of a great system in a great room. Headphones are much like a model - they can be spectacular at their scale and cost much less than the real thing, but they generally cant beat the real thing if the real thing is done well.