From a practical stand point, headphones win hands down when you have lack of space, need transportability, need isolation from your environment, or desire the personal nature of the experience (e.g. not bothering others... too much).
You included the phrase "theoretically similar level" but there are financial realities. I can afford (without major sacrifice) the very best headphone system on planet. The only way I could get (maybe) the sound quality from speakers would require me to completely gut my daughter's college fund...something that isn't going to happen. So if I want to maximize my SQ, my finances suggest headphones would be the wise path.
As to the "more detail" and "more intimate" that you get from headphones suggested earlier, I am not sure I completely agree with that IF the speakers and headphones are at a similar level, at least in the past. In the mid 1990s I thought the Lambda Signatures were the very best headphones I had the pleasure to use. [I am talk past because that was the last time I did serious listening to top end speakers] There were no speakers I could afford that could touch the Lambda Signatures.... but there were some speakers I listened to that I thought has just as much detail, and when I sat in the sweet spot of properly positioned speakers I have the same sense of intimacy I got from the Lambdas. I know headphones have improved and now there are several headphones that exceed my Lambdas and the speakers I heard in the 1990s. Have speakers kept pace in the last 15 years? I don't know. If they have, I expect that they have a sky high price.
Why speakers? It can be nice to feel the bass slam in your gut. Given most mixing, speakers typically give better imaging. It can be really nice to share music with others. When doing casual listening, especially when talking with others, speaker are much less of a distraction / barrier.
I have always owned both speakers and headphones. Every 15 years or so I flip which is my primary method of listening. The driver has typically been somewhat external - financials or the nature of family life. In the last year I have started the to transition from speakers to headphones as my primary transducers. Will I switch back to primarily speakers? Maybe, ask me in another 15 years.
--Mark