Why does Madhouse produce anime with consistently high-quality animation?
There seem to be a few points that have or could have led to high-quality anime coming out of Madhouse.


It is a relatively old company. Having been started in 1972, it has had time to grow and figure out its style, at least compared to many anime studios which are from the 1990s or 2000s.
"Unlike other studios founded at this time such as AIC and J.C.Staff, their strength was and is primarily in TV shows and theatrical features. Expanding from the initial Mushi Pro staff, Madhouse recruited such important directors as Morio Asaka, Masayuki Kojima, and Satoshi Kon during the 1990s. Their staff roster expanded in the 2000s to include Mamoru Hosoda, Takeshi Koike, and Mitsuo Iso, as well as many younger television directors." (x) That shows a relatively strong set of directors.
They have a subsidiary company that focuses on computer graphics and a Korean animation studio that they have invested in and outsource to. Those show effort put into having work being done by those who specialize in it and are good at it.
They've collaborated with a number of big names in manga like CLAMP and Naoki Urasawa.


While the studio itself doesn't seem to be huge (about 70 employees, compared to 130 from Kyoto Animation, 120 from Production I.G., and 2010 from Nippon Animation), it has been a subsidiary since 2011 of Nippon Television, which is a massive television network in Japan. That may give it access to additional funds that would allow them to invest more into animation.