Why is it disliked according to the Hanafi fiqh for a slave and an illegitimate child to do imamat?
In the name of Allah, the most beneficent, the most merciful.
One of the reasons why it is makrooh for a slave and an illegitimate child to lead the congregation in prayer is because the above individuals are often uneducated in the knowledge of religion. It is argued that the slave, due to his preoccupation with his master’s work is unable to have any time to acquire knowledge whilst the illegitimate child, due to an absence of a father or guardian may lack a good upbringing and education. However if the above individuals are the most educated in society then it will not be makrooh for them to lead the congregation. (Raddul Muhtaar, VOL1, P413-415)
Allah knows best
Darul Ifta, Birmingham.