Headphones vs loudspeakers

Could you tell why headphones sound better than loudspeakers in general? When listening to music through headphones you hear more details, more ambiance and at the same time the sound is more pure than through loudspeakers. It's also as if you can listen to inferior CD-player without sacrificing much of the sound quality. Even with an excellent audio system the sound has less immediacy and is not so detailed as with headphones. What is the problem with audio systems? Are we dealing with psychoacoustics or...?

I agree with you head phones don't have realistic (visceral) bass and the soundstage is very artificial, but they give tons of details and they have better tonal balance than most audio set ups with speakers. The strange thing is: even with mid-fi gear the high resolution still remains and the sound doesn't lose it's smoothness.

Something not being mentioned here is "efficiency". Headphones are going to be much easier to driver than typical passive speaker systems, through passive crossover networks and such. Also, yes, woofers driving a larger space are not as efficient overall - unless you get more woofers in volved, and likely active woofers at that.
Then, of course, yes, acoustics of the room come into play, associated equipment choices, set up, etc.
You should always consider variables when considering any medium, factor, issue, etc.
the same issue goes for car system efficiency vs. most home setup's. The woofers are not only closer to so many boundaries in relation to wave length - that they are reinforcing more of the bass frequencies- but the size of the woofers in relation to the amount of air is a much greater precentage. Again, efficiency for dynamic potential is higher in this "pressure pot" situation. It's likely a simmilar situation with the headphones, I pressume
..on another point regarding headphones.. Most headphone jacks are of poor quality, and the circuits are afterthoughts. To get the best from headphones, they need a dedicated headphone amp.
Stringreen: even with mid-fi non dedicated head phone amp the sound through head phones is better (with better tonality and fine dynamic shadings) than many high-end set ups. That is the dilemma. One more thing: though head phones many mediocre recordings become listenable --> I simply hear much more details through the phones. Of course the sound gets better with better head phone amps.