Answered by Shaykh Ilyas Patel
Is there any harm in choosing which mosque one attends in a city. Suppose for Juma prayer, one does not attend the closest mosque but instead prefers a slightly farther mosque because he prefers that Imam?
Allama Tahtawi mentions in his commentary on Maraqi al-Falah as follows:
“There is difference of opinion amongst the scholars, as to whether praying in the local mosque is better than in the congregation held in the Jami (central) mosque.
If there are two Jami (central) mosques and they are equal: then the one which is the furthest away is more virtuous to attend.
If both are equal in distance, then the one which is close is more virtuous to attend.
If both are equal in this respect also, then the layman can choose either.
The sacred scholar should go to the one which has less attendance, in order that more people are attracted to the mosque.
The student should go the mosque of his teachers – from al-Nahr-al-Fa’iq.” [Tahtawi, Hashiyat Maraqi al-Falah]
And Allah alone gives success.
– Ilyas Patel