Egyptian religion ran on offerings. A tomb, a mortuary temple and a god's shrine all worked the same way: food, drink and incense were brought at fixed intervals and presented to someone. The Opening of the Mouth is the rite that supplied the someone. Until it was performed, a mummy was a wrapped body and a statue was worked stone, and neither could take what was offered to it. Afterwards the ka of the dead person, or the god, could inhabit the figure and be fed.
That explains the two settings in which the rite appears, which otherwise look unrelated. At a funeral it was performed on the coffin propped upright at the tomb door, with the son or the officiating priest touching the face of the mask. In a temple workshop it was performed on a statue as the last stage of making it, and on the temple itself. The Egyptians did not treat these as a metaphor extended from one case to the other. Both were the same operation on a made thing.
The sequence of episodes grew over time. Old Kingdom versions are short. By the New Kingdom the ritual as written out could run to seventy-five scenes, taking in purification, the presentation of an ox foreleg, the touching of the mouth and eyes with a series of implements, censing, dressing and a final meal. What stayed constant across two and a half thousand years is the gesture at the centre and the claim behind it, that speech, sight and appetite could be given to something that did not have them.