It means devs didn't optimize the games? or its about raw power? or technologies?
My take, its a mix of all that. If they develop for nvidia, nvidia will likely have some gains and vice versa.
In the benchmarks I have seen though, a rule of thumb seems to be nvidia does a little better on 4k gaming while amd does a little better on 1440 and 1080. There are some games though that amd is a little better on even on 4k.