Priestley uses the inspector’s arrival to highlight the hypocrisy of the Birlings and other members of the middle-class elite who believe that they have no moral obligation towards those less fortunate than themselves.
The inspector's visit represents an intrusion into their lives, which they are not prepared for or able to handle.