This is the refutation to the Marshall Defense. The main problem is white can play e4, and black has to move the knight. In the Gruenfeld, black plays Nxc3 after e4 and has a nice position. The most important thing is that white has developed the queen's knight in the Gruenfeld. If white played 3.Nc3? against the Marshall Defense black would have a good position.
Grünfeld vs Marshall defence QG

Post 3 is not entirely true. Take the Fianchetto Variation, for example. White has not developed his Knight to c6, and Black's Knight goes to b6. For example, 1.d4 Nf6 2.c4 g6 3.g3 Bg7 4.Bg2 d5 5.cxd5 Nxd5 6.e4 Nb6 (other move orders are possible too).
That said, White has committed to g3 at that point. Commitment has part to do with it, but what commitment isn't always 100% the same. It can be Nc3 or it can be g3.
It's similar to why the Dutch is sound against 1.d4 and the Bird is weaker. In the Dutch, White has committed to 1.d4, which weakens e4. In Bird's Opening, Black hasn't committed to ...d5, which in and of itself is a good move for Black, but the fact that Black hasn't committed to it makes 1.f4 even weaker!
After 1. d4 d5 2. c4 Nf6 3. cxd5 Nxd5 4. Nf3 g6 5. e4 Nb6 6. h3! (preventing Bg4) Bg7 7. Nc3, Black gets a much worse version of the Grünfeld. This shows the importance of Nxc3 in the Grünfeld concept, instead of the inferior retreat Nb6. This explains why White often plays 3. Nf3 first after 1. d4 Nf6 2. c4 g6 and why Black waits for Nc3 or at least a commital move like g3 before playing d5.

I forgot all about the fianchetto variation. Isn't that line considered better for white?
Not really. The best lines for White supposedly are the Exchange and Russian Variations.
The other downside to the Fianchetto is you must be willing to play the fianchetto King's Indian as well. Even some Grunfeld players opt for the King's Indian against g3 lines and the Grunfeld otherwise.

But if I understand correctly Grunfeld is better because of tactical reasons not strategical (since in both defences white can try to gain two centre pawns)??
There is a fine line between tactics and strategy.
By taking on c3 black achieves 3 things.
1) He wins an important tempo for his counter attack on the center because white has to take back
2) The knight on c3 is a better defender of the center then a knight on b6 is an attacker of the center. Black exchanges a good defender for a not so good attacker
3) The formation with c3/d4/e4 is suprising enough not as stable as the formation b2 /d4/e4 this is because in the first formation the break c5 is less strong
Hi all I was wondering why the Grünfeld is considered a good opening but the Marshall defence to the Queen's gambit is not. Both cases white can get two centre pawns? Can someone explain this in strategic terms to me? Thanks in advance
The two openings for reference:
Marshall defence:
Grünfeld defence: