I learned that 800 years ago there was a terrible logistical problem in castles.
People wanted to have a convenient place to pray. So in a castle that would be on the lower floors.
However, one can't put themselves above God so if they built it on the ground floor they couldn't build anything over the prayer area.
That is why some castles have alcoves that stick outside the wall. Technically there is nothing built above it but only barely.