Why don't masters prevent the pin after Bg4 in the modern Italian game? In the Italian game, according to the Lichess masters database, the play usually starts similarly to
[FEN &quot;&quot;]

1. e4 e5 2. Nf3 Nc6 3. Bc4 Bc5 4. c3 Nf6 5. d3 d6 6. O-O O-O 7. Bb3

However, this completely ignores the threat of Bg4, that can be played by black after 5... d6. This pin is somewhat nasty, since it can't be broken by retreating the light-squared bishop to e2 and breaking the pin by h3 followed by g4 weakens the kingside considerably.
I also remember some chess video recommending beginners to play h3 as soon as black plays d6 in the Italian game. Interestingly, Stockfish evaluates this position after playing 7... Bg4 as roughly +0.5, so 7... Bg4 is an inaccuracy. Actually, the engine also claims that after 7... a6 8. Bg5 an analogous pin from white also leads from white's slight advantage to an equality.
Why do masters (and higher-rated players) ignore the threat of Bg4?
You're referring to ...Bc8-g4 as a threat. The only threat it makes is ...Bg4xf3, losing time and the bishop pair.
While White has d4 under wraps with a pawn at c3, theere's no ...Nc6-d4 coming to pressure the pinned knight. The f6-knight has to move to a lesser square to prepare ...Qd8-f6, which is nothing because Nb1-d2 is right at hand to prevent a fracture of White's king position.
A bishop at g4 is a target for this maneuver: Nb1-d2-f1-e3 or Nb1-d2-f1-g3 plus h2-h3 when the bishop can't maintain the pin by ...Bg4-h5. White also has the option of h2-h3 plus g2-g4 (if ...Bh5) then one of those knight maneuvers aims for f5 at the end. See, you're talking about h3 plus g4 like it's a bad thing but while the center control and development are equal, it's not so risky to create those holes in the king position, and if there's nothing going on the center, then that expansion (or a4, b4, a5, etc. on the other wing) is one of the only ways to generate heat.
This is not a position for inexpert players to be concerned with. It's very quiet, which is OK for masters, because they know how to fend off an opponent who stirs it up too soon, and because they know how to open the quiet position when it's the right time. Average players and students should be studying games in which the tactics arise early, because it's recognizing those tactics that eventually gets them to where they're genuinely able to play these humdrum Giuoco Pianos.