There are numerous places where the Talmud discusses some very personal facts about certain rabbis. For example, Baba Metziah 84a has a discussion about the size of rabbis' sex organ. How did the rabbis know such personal matters, and why is the discussin of anyone's private affairs important to have been written in the Talmud for all to read?
Tosafos addresses the second half of your question regarding Bava Metzia 84a.
אמר רבי יוחנן איבריה דרבי ישמעאל כו' אלו דברים נכתבו שלא להוציא לעז על בני אדם שהם כך
These matters were written so people will not slander people who are [big] like this. (Kollel Iyun Hadaf translation)