Potiphar's wife spins a calculated web of lies to the members of her household, carefully framing Joseph for a crime he did not commit while masking her own guilt. To make her false accusation believable, she manipulates the physical evidence left at the scene, specifically Joseph's abandoned clothing.
She needs to explain exactly why his garment remained in the room, and she crafts a story to fit the evidence. One approach suggests she told her staff that Joseph voluntarily removed his clothing to attack her, but when she began to scream, he panicked, left the garment behind, and ran away [בכור שור, חזקוני]. Another perspective suggests she framed the struggle differently, claiming that she was the one who bravely grabbed his clothes to hold him back, hoping to delay him until the people of the house could arrive and capture him [רד״ק].
In her fabricated account, she is careful to state that the garment was left merely beside her, rather than admitting it was left directly in her hands. This is a deliberate choice. If she had confessed that she was physically holding the clothing, she would have exposed the actual events and revealed her own shame. It would have proven that she was the aggressor who grabbed him and tried to force him into sin [הכתב והקבלה, ביאור יש״ר].
Her story also emphasizes that Joseph fled outside. She intended to imply that he ran out into the public market to distract his lustful urges among the crowds. By painting him in this light, she hoped the household staff would back up her story to her husband, testifying that Joseph was a known womanizer, even though the staff ultimately remained silent [העמק דבר]. However, this exact detail of running into the public market actually highlights Joseph's moral greatness. He purposefully fled into a crowded, public space to ensure he was completely safe and removed from her grasp [נתינה לגר].
This moment of immense courage did not go unrewarded. Because Joseph chose to run from sin, God promised that his actions would echo through history. Generations later, in honor of Joseph fleeing, the sea would flee from before his coffin as the Israelites left Egypt [דעת זקנים].