Yes, this is true. And I will agree with you that it's not particularly
smart, but I do see how there would be "scientific" basis for the belief in divinities that controlled natural phenomena - after all, it
is true that celestial bodies control things like heat, rain, wind, eclipses - and without proper knowledge for understanding how that bright shiny thing remained "suspended" in the sky despite other objects being subject to Earth's gravity pull (I assume they did not have balloons), it could have been a fairly reasonable scientific conclusion at the time to believe that something was holding it up. And they may have noticed that things seemed to run more smoothly while they were sacrificing people than when they weren't (but correlation does not equal causation...) I do give you, however, that jumping from those conclusions to "[The sun] is a god named Wijsdf;er who must be sacrificed to every 57th day or we will have locust plagues" isn't particularly rational.
I suppose I should have specified that I do not think that scene in itself is a depiction of a rational act, but the theory behind the act could be at least in part rational. Such it is with birthdays, too, I think. Rational to take note of the date of your birth, because it is useful for a number of instances, both practically and socially. The ritual of cake and presents is more of a jump.