He said it because they are playing them.
Yes titles and success playing the way Barca did is the exact reason they got so roundly praised.
Result is far more important if comparing the two seperately.
Having more of the ball is not always being the better team.
Pep always had high esteem of unsuccessful teams that play great football. He said it about the Ajax, Dortmund too.
In football as a business, of course the results are more important.
But in terms of pure football, the most important thing is the 90 minutes of the match.
That's why people legendize The Great Dutch team of 1970s that ran havoc throughout the world cup tournament. They are acclaimed by those who know football as one of the greatest teams ever and by some as the greatest international team ever.
The final is remembered for only two things
1. How Germany couldn't even touch the ball before Netherlands scored first goal after numerous breathtaking short passes only to be stopped by fouling Cruyff.
2. How Netherlands were more interested in expressing themselves and completely outplaying the opponent than actually winning the game.
To be fair, if results are far more important, you should not claim that Barca is the best team in history. Because there are atleast 5 teams that are as successful as Barca throughout history. It's the quality of play that has earned Barca, Ajax, Netherlands of 1970s and Spain the acclaim it has.