It is not unusual for an enforcement officer to invite what is called a retrospective planning application, i.e. an application made for the development after it has taken place, when investigating a breach of planning control. Doing this normally suggests that the Local Planning Authority (LPA) might find the development acceptable, but this is not certain, e.g. if an issue not anticipated comes up when the application is processed.
In some instances the LPA might consider the development acceptable subject to conditions, e.g. if the unauthorised development is a restaurant near houses, they may want to impose a condition requiring it to close by a certain time, so a retrospective application is invited to enable such conditions to be imposed.