Paris “city” is just the most heavily urbanized central core of a massive metropolitan area. The urban part of which is 1,101.7 sq mi.
I’m not sure about Barcelona but San Francisco is pretty much like Paris in that way (just way leas dense).
It’s really not a fair comparison.