Actually in north England (eg Manchester) the vowels are pronounced exactly the same: "poot"/"boot". :)
However, here's a possible explanation for 'regular' English: "but" is a common particle, often used, and usually gets a weak stress in a sentence. "Put" is a verb and therefore receives a stronger stress.
So the vowel sound in "put" is more like the short "oo" sound. However the vowel in "but" is more of a lazy grunt, ie. the very easy 'schwa'... that upside-down 'e' you sometimes see. It's a neutral vowel sound.
But as fdmaxey points out, phonetic spelling is not very consistent in English... often you just have to learn and group the sounds as you go.