Ezekiel responds to the confusion of the people regarding his strange behavior, making it clear that his actions are not the result of a personal choice. He explains that he had received a prophecy in advance about the death of his wife, and that it was God who explicitly commanded him to refrain from mourning her.
This divine message was specifically meant to be shared with the public. The prophecy was given so that Ezekiel could directly answer the people's questions, explaining the meaning behind his actions and what this living sign represented for them [רד״ק].