The Sky Police main theme and the music in the last segment are parodies of music from the musical Thoroughly Modern Millie, specifically, the 1926 song "Baby Face".
This is the second time that the First Church of Springfield got destroyed after a flying object got out of control and crashed into it. The first was Homer's rocket in She of Little Faith. Also, in both situations, someone (Homer/army soldiers) tried to shoot down the flying object.
When the church gets replaced by the "Atheist Strip Club", the "Appearing Tonight" billboard advertises Crystal Hitchens, which is a reference to a well known atheist Christopher Hitchens.
Apu and others say that card counting is legal. However, the group were assisting each other and card counting is illegal if a device or a person assists the player, meaning that they were all breaking the law.