The inspector does function as a way of expressing the views which Priestley most wanted to clarify in the play. He also represented the ordinary man, in a position as protector of the people, who stood up for the rights of everyone in the play.
He is most sympathetic, of course, to Eva Smith, and the 'millions' of Eva Smiths who find themselves ground down by circumstances created by those who believe themselves to be superior. He does, however, give Eric and Sheila the chance to learn from their mistakes and become better people as a result.