Now, because we live in the Internet age, I am going to pause and see if I can find anything about that phrase on Wikipedia...I'll be right back.....well, not a very satisfactory trip...no reason to spend more than five minutes on this search because my point is simply this: we know the function of the phrase; that it is a warning to be careful because you may be close to bumping that old head on some low hanging branch or whatever.
It is a useful function. The fact that the words as we ordinarily use them make no sense is irrelevant to the utility of the way they function as a communication. Off hand it seems paradoxical. If we all agreed that "oo boo oo" functioned as the same warning as "watch your head" we could use those sounds and they would serve the same purpose. But those sounds could not be re-arranged to mean anything else.
The words individually have meaning. But as they are arranged in that phrase they produce a phrase without meaning, but with a specific function. That simple reality intrigues me and I will have to return to play with it after a while.