The 19-year-old dropped down into Gareth Southgate's squad from the senior ranks and played in both matches as the Young Lions booked their place in the finals of the competition next summer.
Van Gaal told reporters: "It is a very good education. I have said that already, when I was national coach. All my players had played in the Under-21s.
"I think youngsters have to play. I was very happy Shaw was playing in the 21s and he himself was also. He needs match rhythm. It was good for the national team Under-21s, it was good for me and it was good for Luke."
Shaw has made two appearances in the Premier League for United since his £27m move from Southampton.