Why would a python go after such large prey?
It's hard to answer your question directly. But one might start by noting that pythons are hardly alone - snakes in general have evolved the ability to swallow prey that is much larger than themselves. It's probably not unusual for opportunistic carnivores to stumble across gorged snakes and make a meal out of them.

But there's a flip side: Consider an animal that has to feed daily. If it doesn't gorge itself snake-style, then it will never be in such a vulnerable state. But it still has to venture out of its shelter or hiding spot to feed EVERY DAY, putting itself at risk each time.

If a snake eats just once a week, then it can spend six entire days hiding from predators.

In summary, it would appear to be a numbers game, and the statistics obviously favor snakes, which have been around for millions of years.