It’s because we are fasting.
In the early Roman Liturgy, Good Friday was a day of strict fasting. Since Holy Communion was regarded as food, no one received it. So no Mass was celebrated. Gradually, however, the liturgy evolved a rite of general communion from bread that had been offered and consecrated the day before, on Holy Thursday. This congregational reception of Communion appeared for the first time in the revisions of the Triduum rites in the mid 1950’s.
The lack of Mass on Good Friday is an act of fasting and abstinence. In fact we abstain from Mass on both Good Friday and Holy Saturday. In this way the Sacred Triduum both begins and ends with the Mass: the Mass of the Lord’s Supper and the Mass of the Easter Vigil, but no mass in between. So we still ‘fast’ from the full celebration of Mass. That is the main reason for the absence of Mass on these days.
There have been dispensations from this, for example, some years ago when a powerful earthquake devastated parts of central Italy, the Funeral Mass for the victims took place on Good Friday that year.