The short answer, explained
For a routine compliance check, HMRC has to give you reasonable notice, at least seven days, before inspecting your business premises. A caseworker cannot simply arrive on the doorstep as standard practice.
Unannounced visits are the exception, not the norm. They're reserved for cases where advance warning would defeat the purpose, for example where fraud or destruction of records is suspected.
Even then, an unannounced inspection generally needs prior approval, either from the tribunal or from a sufficiently senior HMRC officer.

