I think it's also funny because it is a play on human stereotypes about robots. Humans tend to view robots as stupid, unfeeling machines. But these stereotypes are often not true. In this case, the robot is more aware of its own mortality than the bartender is, and makes a conscious choice to die right there in the bar.