The memory contents have to go somewhere. They can't stay in RAM as RAM will be powered off. If there's sufficient free swap space they go there. If there isn't, the current swap and memory contents get compressed and it then goes to swap. If there's still not enough space, hibernation will fail. So if your swap is filled with incompressible data to its full capacity, you will not be able to hibernate. This is very unlikely if your swap is enormous, but it can happen.
This seems like a bug because it means system state results in unpredictable behavior. There should be a dedicated swap for hibernation, like the pre-allocated hiberfile used by Windows.
you can set it up that way if you prefer, there is a resume= kernel param you can set to a separate file or device. I keep them combined tho because I hardly ever use much swap, and don't have a ton of disk, and if hibernation ever did fail, I can just close some tabs and be fine