The alcohol moistens the cake and fruit, flavors the cake and acts as a preservative. It's hard for bacteria to live in a high alcohol/low moisture cake.