Al-Azhar was founded by the very branch of Islam it later became famous for opposing.
Founded Shia, remembered Sunni
Al-Azhar was established in 970 by the Fatimid dynasty, a Shia Ismaili caliphate ruling Egypt, initially as a centre for propagating Shia Ismaili teaching. After Saladin overthrew Fatimid rule in 1171 and restored Sunni authority in Egypt, the institution was reoriented toward Sunni scholarship, a reversal so thorough that Al-Azhar's later global reputation rests almost entirely on the Sunni tradition it adopted rather than the Shia purpose it was originally built to serve.
Built up in layers
The mosque and university complex reflects roughly a thousand years of successive additions, with Fatimid, Mamluk and Ottoman rulers each adding gates, minarets and teaching halls in the architectural style of their own period, so that walking through the complex moves a visitor through several centuries of Islamic architectural history within one continuous structure.
A voice, not the voice
Al-Azhar's scholars and its Grand Sheikh are widely consulted on questions of Sunni Islamic law and issue influential rulings, giving the institution outsized informal authority, though Sunni Islam has no single central authority comparable to a papacy, and Al-Azhar's opinions, however prominent, are not binding on Muslims or institutions outside Egypt.