The exact quote is: "In the long run, most Turkish dynasties did become identified with Sunni Islam and with the Hanefi school of Jurisprudence, the one least restrictive of the ruler's discretion and the most accommodating to custom." It's taken from Carter V. Findley's Turks in World History. To clarify on the question, what exactly in the Hanefi school makes it more accommodating to customs and and least restrictive of the leaders discretion than, say, the Shafi school or even Shia Islam altogether?
One of the aspects that made Hanifi doctrine so attractive to the Ottoman rulers was its emphasis on qiyas, legal deduction through analytical reasoning. Qiyas is - along with the Qur'an, Sunna, and Ijma' (consensus) - one of the 4 main pillars of law accepted among the Sunni schools of thought. However, the various schools weigh these four factors differently in their rulings.
It is possible to think of qiyas as a process similar (to an extent) to how a modern-day common-law judge may operate, applying accepted principles to differing cases. If confronted by a problem for which there is no clear answer within the Qur'an or previously ruled upon by a judge, Qiyas can be applied so long as the new problem and the precedent share the same cause. For example, Qur'anic prohibition of alcohol uses the word khamr, or wine, and declares it haram because of its intoxicating effects. Qiyas was then used to extend this prohibition to other substances such as drugs, which share similar intoxicating effects, evening though khamr doesn't refer directly to them.
Hanafi law was much more liberal in its use of qiyas than other schools of thought, like the Hanbalites (Ibn Hanbal himself actually rejected qiyas as a source of law). For example, the Hanafites compiled various fatwa rulings into furūʿ collections, in which they would simply rulings down to abstractions. Names, dates, and places would be removed to leave behind a concise legal ruling. An example of this, taken from Wael Hallaq's book Sharīʿa is "If X does Y under a set of conditions, then L (legal norm) follows". These legal rulings could then be consulted at a later time, as they composed the third tier of authoritative legal doctrine in the Hanafi school of thought, after the writings of the founder himself and his immediate successors. I believe that you can see how this would have lent the Hanafi school a much more flexible nature than that of a school like the Hanbalis who rarely employ qiyas.
This flexible nature led to the Hanafi school of thought having some rather practical beliefs. To highlight only a few
In economic matters (particularly in contracts):
They ruled that a contract was still valid if perishable goods were exchanged immediately and payment was made at a later date (bayʿ al-istijrār).
They allowed economic partners the most freedom to act on each other's behalf without having to seek permission for dealings outside of the norm. They also limited the liability that one partner would suffer if he caused damages to the other, except in cases of neglect.
They allowed for transfers (ḥawāla) of debt between different actors (i.e: If A owes money to B, and C owes money to A, then A can assign the debt of C to B and escape any liability). This allows means that in Hanafi doctrine debts do not disappear with death, but rather are passed on to the debtor's heirs.
In Social Matters:
The Hanafis were the sole school to allow for women, upon reaching the age of maturity, to marry without the approval of their guardian.
The Hanafis allowed for witnesses to marraige ceremonies be non-Muslim and did not ensure that they were "upright" (honorable and good people), unlike the other 3 schools.
The Hanafis were alone in stipulating that, for a marriage contract to be married, the man had to pay a dower to the woman.
They also were among the most liberal regarding divorce, from both the side of the husband (typically the repeating of ṭalaqa, or divorce, three times) and from the woman (khulʿ, which may or may not require the woman to repay the dowry).
Of course, this is only a small selection of topics. It was merely meant to show that the Hanafi school of thought is one of the least conservative, allowing for the application of qiyas to form new judgments. Coupled with the Hanafi respect of contracts and relatively social liberty, it made it a fitting choice for a mercantile, socially diverse empire.
Sources
I drew much of this, including the examples, from Wael Hallaq's book Sharīʿa: Theory, Practice, Transformations. If anyone wants a one-stop book for most issues regarding Islamic Law, I highly recommend this.
To look more into the FurūL: Wael Hallaq, "From Fatwās to Furūʿ: Growth and Change in Islamic Substantive Law"
For a more in-depth view of Qiyas itself: Hasan, Ahmad. “SUBJECT MATTER OF QIYĀS.” Islamic Studies, vol. 21, no. 4, 1982, pp. 97–129., www.jstor.org/stable/20847220.