Why was calligraphy used in religious ART?

to have pictures depicting important events that would be abstract, and therefore not idolatrous, or idol-worshiping.