Vayigash. Embarrassment. Judaism's Fourth Cardinal Sin

Joseph could no longer control himself before all his attendants, and he cried out, “Have everyone withdraw from me!” There was no one else about when Joseph made himself known to his brothers. (45:1-2)
Why did Joseph need everyone to leave? Why did he want this moment to be private one between himself and his brothers?
He could not bear that Egyptians would stand beside him and hear his brothers being embarrassed when he would make himself known to them. (Rashi)
The Midrash Tanhuma imagines that Joseph was taking a risk, sending his bodyguards out of the room and facing a malevolent Judah along with his brothers. They had tried to kill him once; who knows what they attempt this time if he were left alone with them? But he said:
“Better that I be killed than that I humiliate my brothers in front of the Egyptians”
Similarly, two weeks ago (Bereshit ch.39), we read about Tamar who became pregnant from her father-in-law, Judah. She was sentenced to death by burning and at the critical moment she sent a private message to Judah with his personal effects, effectively notifying him that he was the father. Why did Tamar not announce her truth publicly? Why did she rely on Judah’s integrity? She might have been executed!