If both the Orthodox and Catholic Church affirm salvation by grace through faith, why did the Protestant Reformation happen? I will often engage in dialogue with Catholics and Orthodox Christians who tell me that the doctrine of their churches affirms that salvation is by grace through faith.

If that is true, then what distinguishes Lutherans from Catholics and Eastern Orthodox Christians?
Because the Catholic Church doesn't teach that we attain salvation only through the reception of God's grace by faith. That's why the Protestant teaching is called sola fide!

The Catholic Catechism says:


  CCC 2010 Since the initiative belongs to God in the order of grace, no one can merit the initial grace of forgiveness and justification, at the beginning of conversion. Moved by the Holy Spirit and by charity, we can then merit for ourselves and for others the graces needed for our sanctification, for the increase of grace and charity, and for the attainment of eternal life. Even temporal goods like health and friendship can be merited in accordance with God's wisdom. These graces and goods are the object of Christian prayer. Prayer attends to the grace we need for meritorious actions.


And the Council of Trent declared:


  Canon xxiv. If any one shall say, that the justice received is not preserved, and also increased in the sight of God through good works; but that the said works are merely the fruits and signs of justification received, but not a cause of the increase thereof; let him be anathema.
  
  Canon xxxii. If any one shall say, that the good works of a man that is justified are in such wise the gifts of God, as that they are not also the good merits of him that is justified; or, that the said justified, by the good works which are performed by him through the grace of God and the merit of Jesus Christ, whose living member he is, does not truly merit increase of grace, eternal life, and the attainment of that eternal life, if so be, however, that he depart in grace, and, moreover, an increase of glory; let him be anathema.


So while the Catholic Church affirms that we cannot merit "the initial grace of forgiveness and justification" it does teach that our good works merit the completion of our sanctification and our full attainment of salvation and eternal life. It also condemns the Protestant teachings that good works are only the gifts, fruit, and signs of justification but do not merit eternal life.

As to the Eastern Orthodox churches, I know much less about them, but I did find this catechism. If I'm understanding correctly, it teaches a rather sacramental understanding of salvation, in which participation in the sacraments is necessary. Protestants would say this too is not compatible with salvation by grace alone through faith alone, as well as the doctrine that Christ is our only mediator (ie, Christ alone).


  The Church is not a building, but a People who are filled with the Holy Spirit and who share in His life bringing His life into the world. It is through the
  sacraments of the Church that we are united to Christ. (p77)


Rather than the Protestant teaching that we are united to Christ by the Holy Spirit through faith.


  Since they [the sacraments] were initiated by Christ Himself, or by the implicit request
  of Christ, they are necessary for our salvation. They were instituted as a
  means of transmitting Grace based on the needs of the believers. This
  is not to limit the action of the Holy Spirit as it can surely act outside
  of these ceremonies. But, Grace can only be received through Baptism
  and the Eucharist which were directly established by Christ. (p92)
  
  Yet, no matter how great our repentance is, if it is not completed by
  the Mystery of Confession it does not give rise to salvation or reconcile
  us with God. It is only through Confession preceded by the sincere
  repentance that our sins can be cleansed and our soul be healed. Repentance alone is not sufficient. (p109)
  
  There is no doubt that God accepts the repentance of a sinner,
  but He forgives it only through the medium of the spiritual Father [a priest] and
  the Mystery of Confession. (p110)