There is not a single opening called the Kings Indian Defence defined by Nf6,g6,Bg7. There are some very different developments, and if you play KID you must be comfortable with all of them.
A. Black plays ..e5 and ..exd if permitted. The Bg7 is then a key player in a Q-side attack, probably involving an open b-file. See some famous Bronstein games.
B. Black plays ..c5 instead of ..e5 (eg against the Four Pawns Attack) Again the KB controls the dark squares and should be preserved. Sometimes not even given up for a Rook.
C. Black plays ..e5 and White closes the center with d5. This is the case where Blacks ambitions are on the K-side. The KB has already played a role by encouraging White to close the center. It may become a liabiity in the endgame, and is often exchanged for Whites QB to allow the Black Knights and major pieces to penetrate the weak dark squares. If White avoids this, the KB may become a strong attacker itself via h6 and f4 or e3. If those squares are blocked, then f6, h4, g3.
Correct handing of the KI Bishop is crucial but seldom simple.