The expression ‘for Pete’s sake’ is mostly used in speech to indicate surprise, anger, or disgust. It has the same meaning as ‘for heaven’s sake’ ‘for goodness sake’, ‘for God’s sake’, ‘for pity’s sake’, etc.
*For Pete’s sake, don’t just stand there like an idiot. Give me a hand.
Nowadays, it is very common to hear people say, ‘god dammit’ or ‘what the hell’ when they are angry or exasperated. In the old days, people were not allowed to take the Lord’s name in vain; they were punished if they did so.
In order to avoid swearing, people began to make use of euphemisms — mild and less harsh sounding expressions. According to scholars, ‘for Pete’s sake’ is one such euphemism — it’s often referred to as ‘minced oath’. The ‘Pete’ refers to St. Peter.