In French you would say 'ça pue' for 'that stinks'. Is there a link with this P-U business?
It is not clear if the current meaning of the term pee-yoo is derived from this Indo-European root. The first Oxford English Dictionary entry is in 1604, where it shows up with several different spellings: pue, peuh, peugh, pyoo, and pew [2]. The "stretching" of the word into two syllables must have happened sometime later.
[1] http://www.etymonline.com/index.php?term=putrid
[2] http://www.grammarphobia.com/blog/2010/08/on-the-scent.html
It contains also part about English-French-Latin connection.
It's somewhat of a children's expression for "that stinks", although adults use it to be funny.