http://revach.net/article.php?id=1652

Section: Halacha   Category: Tshuvos
Rav Moshe Shternbuch: Bringing the Body of A Talmid Chochom Into The Bais Medrash
The Shulchan Aruch (YD 345:20) says that you may only bring the body of a Niftar into the Bais Medrash for the Levaya only if he is a "Chochom, V'Aluf, V'Gaon".  The Chochmas Adam says that they did this with the Vilna Gaon.  Since then, this has become a common practice despite the fact that there is no Vilna Gaon anymore.  Many have screamed about this minhag, says Rav Shternbuch, since it causes harm to the Niftar.  Furthermore the Maharam Schick was very against this and said there is no one anymore who has the stature of a Talmid Chochom according to Halacha.

Nevertheless says Rav Shternbuch nowadays we do bring Talmidei Chachomim and Roshei Yeshiva into the Bais Medrash where they learned and taught.  The reason he says is because today "B'Avoinoiseinu Harabim" we don't have the proper Kavod for a Bais Medrash like we ought to.  We eat and drink and talk in our Batei Medrashos and we do not worry about the bizayon.  Why should our only Kavod Bais Medrash begin and end with leaving the Rav or Rosh Yeshiva in the street after he dies? 

Moreover he says the reason why it is bad for the Niftar is because if we treat him with more respect than he deserves they will punish him in Shamayim.  Since we do it to many people today who are not technically Talmidei Chachomim according to Shulchan Aruch, it is not as if he is getting extra Kavod and it will not get him in trouble in Shamayim.

Disclaimer: We try to convey the Tshuva to the best of our ability. We admit that our understanding may not be accurate. Please also understand that this Tshuva may not be the final word on this topic. One should consult a Rav before drawing any conclusions.