The passive voice is a way to say that something happens to someone or something. In Português, just like in English, the passive voice is used to focus on the action or the object, rather than who is doing the action.
In these examples, the focus is on the action (writing, making, cleaning) and the objects (the letter, the cake, the windows), rather than who did the action. This is the essence of the passive voice.