There can be numerous reasons for such pawn moves.
I'll restrict reasons to players under 1600
1) It's part of opening theory.
(They have seen it before....somewhere.)
AttilaTheHorn - amblessador RHP 2011
2) Worried about a piece going to certain square because in previous
games that piece going to that square caused loads of self inflicted problems.
You often see players playing 3...h6 to stop Ng5 hitting f7.
21,460+ times 3...h6 been played on here.
3) A Bluff.
Here some Black players....
play 3...h6 to tempt their opponent to go sac happy or underate them.
A player called Oldmanwithatwix has played 3...h6 here 119 times (W.45 D9 L65).
4) Luft for the endgame.
When I was starting out I often castled and played h3/h6 right away
so I would not have to worry about my back ran later on.
A few pawn storms with Bxh3/h6 mating attacks when I bumped into the
good guys soon cured me of that.
5) They don't know what to do so push a pawn.
If you don't know what to do - do not touch a pawn. Move a piece and pass.
Let your opponent think of something to do - he will be wrong.
6) To open up a retreat for a piece. (or redeploy it)
Fat lady gave a bolt hole for a Bishop. But it may also be to redeploy a piece.
Let's us take the thread up a notch have a look at the good guys.
Look at this position from game 6 Anand - Carlsen. (Black to play)
Magnus actually anticipated White playing h3 here and played Nb8. Why?
The game went:
6) A waiting move.
As I said one should not 'pass' with a pawn move however sometimes...
EricD (1174) - psalmist (1235) RHP 2012