Why isn’t there any concern that someone may travel with a sefer torah in a r’shus harabim on shabbos in order to ask a chacham how to read it and thus transgress the melochah of hotzoah?
We see regarding other mitzvos like lulav and shofar that this issue was indeed a concern.
You are asking a good question. The Tosefos Yom Tov (Megillah Perek 1-2 D:H Chol L’hiyos), asks this question, and also brings the Rav, who asks this question regarding reading parshas zachor on shabbos? There are a number of answers given for this. The Tosefos Yom Tov answer that being that a person readin the torah is required to review the reading two three times before reading, therefore he is already considered knowing it, and we are not afraid. Numerous adhronim however give a different answer, The sefer answers that the gezeira only applies to mitzvos that one may do in private such as reading the megillah (although it is preferred to be in public however it is permitted to do in private) or shaking a lulav, however reading the may only be done in public with a minyan, therefore there is no fear, because someone will remind him, not to carry it outside. See Hagahos Peulas Sachir on Maaseh Rav number 171 that gives the same answer in the name of the Vilna Gaon, also see Kuntres Ohr Yisroel # 37 pg. 161brings the same answer from the sefer Tosefos Hachadashim, Devarim Nichonim pg. 297, Toras Rabeinu Shmuel M’salant 1- pg. 123.
A third answer given in Daas Torah (O:CH 135-14), that since it is forbidden to move a sefer torah from one building to another, (except under certain conditions) therefore there is no fear of taking the sefer torah outside to learn the reading.
Also see Minchas Yitzchok 3-58.