Why is 8. a5 a good move in the mainline italian?


Yeah, those moves are hard to understand at first. I would recommend that you start with simply developing pieces at first, as long as you understand your moves and they are not blunders, you are fine!
Would be nice to see the specific line you are referring to, but in general White plays a5 to just gain a little more space on the queenside and in the long run "freeze" Black's queenside structure. Black typically plays ...a5 to stop this queenside expansion, but as mentioned above, this has the drawback of weakening the b5 square.
I don't know if your chess.com ratings are an accurate representation of your current strength, but if they are, then I wouldn't recommend learning the subtleties of the Italian, as these are things that even strong players may struggle to understand.

I think I'm a little taller than my height, and a little heavier than my weight.

This is mainline 2 Knights, not Italian, but anyway.
Other than generally gaining space, this moves takes care of Black's plan of ...Na5 (in place of ...Kh8) followed by ...c5 after the c4 bishop retreats to a2, and which has more or less become the most popular plan of the 2 knights defence currently.
Referring to the position in #8.