I'm a strong believer that a class doesn't matter but the player behind them. You could have someone inexperienced play a warrior. You could also have a master play a necromancer. You'll notice a significant difference between them. I'm happy to take any class. Every single person, every single class has their strengths and weaknesses. They have their play styles and mentalities.
I agree to what you say overall but, class does matter when options of choosing classes exists. If I were to choose which classes I'd like to run with in a dungeon, guard, war, mes would always be ideal. Any group can murder any content in this game with these 3 classes playing together assuming the players know what to do with the classes. Does it mean other classes are worthless? Absolutely no. I found most of my fractals 30+ runs to be of better experience when I ran with a group that did not have any duplicate classes.
... most of the time is see people asking mostly for a party consisting of a mesmer, warriors and guardians only...
What's with that?
For COF, warriors and mesmers can zoom thru it in 5 mins flat or less. I think you are seeing people spamming that on GW2lfg. For COE, melee rocks. For TA, that class combo wreck thru all paths in less than 70 mins. For AC, guards and wars kill it, having mes is just groovy. So, for some people who are trying to do fast money runs, having a group that delivers excellent defense combined with offense is always ideal. It's not driven by class bigotry but, by zeal to find the eziest route to success. It's all about optimization.
Best thing to do is LFM. You decide how to play that way. If you see you have 2 guards in your group, you may not choose to add any more guards. It beats me why people even do LFG. If you are unsure of how a dungeon needs to be run, do LFM and identify a leader in your group to guide you thru the content. Keep your eyes open so that next time, you can lead the pack thru it.