Why has x been allowed to make a planning application for work they have already carried out without permission?

It is not an offence to build something without planning permission and retrospective applications are a way of controlling the situation.