During baking, some alcohol does evaporate, but not all. The syrup added post-baking reintroduces alcohol flavor. For a no-alcohol cake, rum extract or other substitutes can be used.