It may just be a funny picture, BUT if the cat is able to get up there, and has done it before, it will do it again. Perhaps when you aren't home.
One day someone will forget to shut that door (if that cat is even locked out of there)
Getting the lid off is nothing to that cat. Some even fall through the lids, bend them, knock heat lamps off (fire hazard). Just a all around bad idea. When you come to a forum such as that and post something, you have to take the good with the bad. A picture such as that is going to raise concerns, we've seen or read about the results of "cats+reptile" interactions all to often.
Of course the cat is attracted. This is a small moving animal in there, it slithers around. It triggers the hunting instinct of the cat, they can't help themselves. Pull a rope across the floor in front of your cat and see what happens.
The cornsnake doesn't look happy. It knows its confined and can't get away, so it does the only thing it can. Threatens. But it may feel great stress at this point. They know there is that animal right there that could kill them in a flash.
This is not interest or a relationship forming. This is a animal with a killer instinct trying to get at a moving target. While the snake is trying to defend its life.
Sometimes its more then a cute picture. This shouldn't be allowed it should be discouraged greatly by preventing the cat to get up there, whether people are home or not. Whether it can actually get into the enclosure or not.
I find scat mats and those cans with pressurized air and a motion detector work great to get cats to stay away from areas they shouldn't be in![]()