For the former, each building connected in an unbroken chain to your main tech center, the House of Wisdom, contributes to unlocking Golden Ages which boost your economy significantly. The Abbasids and the Holy Roman Empire both encourage making very dense urban cores.