Actually Barcelona uses that formation only on paper. They rarely have 4 players playing as defenders, they kinda use 3 (two central defenders and one full back pass the ball between them and the keeper). Playing like this allows them to have a greater number of players in front (where two of the attacking players sit very wide on the pitch) which is extremely useful if the other team is pressing.
About 4-2-3-1. I guess it's a very good formation because it allows you to use a large type of players on every compartment depending on your needs. In fact this formation is played by teams with a bigger squad (which has very good defenders, 2 or 3 defending midfielders and very skillful attacking players - see Barcelona, Real Madrid, Manchester City, Borussia Dortmund and Bayern's tactics and depth of squad).
It is also a good formation because it allows a larger number of players run freely.
All this information are from talk shows and math analyses.