Perhaps Snape has a moment of softness. He sees Harry as an innocent child about to embark on a great adventure. His own past experiences with Hogwarts make him want to be part of this important moment for Harry, despite his usual cold exterior towards the boy.
It could signify a turning point in their relationship. They've had a rocky relationship in the original series, so this could be a moment of reconciliation. Snape might finally be seeing Harry as more than just James Potter's son.
Well, it could potentially make their relationship less hostile from the start. Harry might see Snape in a more positive light, as Snape is doing something kind for him. Snape, on the other hand, might also feel a bit of a connection to Harry, knowing he's starting this important journey.
Maybe Snape has some complex emotions while delivering the letter. He might be secretly hoping Harry won't come to Hogwarts because of his dislike for James Potter, yet he has to follow Dumbledore's instructions.
Maybe Snape was trying out a new, experimental spell and it backfired on Harry. He could have been aiming for something else entirely, like a simple transfiguration for a lesson, but got the spell wrong and instead of changing an object, he changed Harry's gender.
Dumbledore could be involved. He often has his fingers in many pies at Hogwarts, so he might be the one who arranges for Snape to deliver the letter to Harry for some greater good or part of his grand plan. Another possible character could be Hermione. She might notice something strange about Snape delivering the letter and start to investigate, suspecting that there's more to it than meets the eye.
It could be a sign of forgiveness. Snape's will might be a way to force Harry, who represents the side of good, to reach out to Lucius, who has been on the wrong side. By giving something to Lucius, Harry is showing that there is a chance for redemption even for someone like Lucius.
It could be Voldemort. Even though he doesn't directly appear in the act of letter - delivering, his influence might be hovering over Snape. Snape might be worried that by delivering the letter, he's bringing another potential threat to Voldemort, and Voldemort's shadowy presence could create conflict for Snape.
Snape could say it was part of a complex experiment to understand the nature of magical essence. He might believe that by turning Harry into a girl, he can study how a person's magic changes with their physical form. Or perhaps he thought Harry needed to experience life from a different perspective to grow as a wizard, so he used a spell to transform him, using some convoluted magical theory as an excuse.
Well, Snape could punish Draco by making him write lines about the importance of Slytherin values. Since Draco is a Slytherin and Snape has a certain pride in the house. For example, he might have to write 'Cunning is a Slytherin strength and should be used for the good of the house' a hundred times. This not only disciplines Draco but also reminds him of his house identity.
Harry could have a complex relationship with Snape's wife. On one hand, she would be his caregiver, but on the other, there might be some initial tension due to her being associated with Snape. However, over time, she could break through to Harry and they could develop a bond based on mutual respect. She might introduce Harry to a different side of magic, like the more gentle and healing aspects, which would strengthen their relationship.