Loneliness can be forced on you. I personally moved and since some girls at the new school decided (in the locker room) that I was lesbian, folks stopped talking to me. I found a very small group of friends the next year at high school.
These girls were half correct in their assessment, but that was no reason for the entirety of a school to decide I wasn't worth talking to.
Seriously, loneliness is awful. I should mention that I had no issues asking folks out later in life (when I became interested in such things).
This sort of thing might have been more common pre-internet times. The internet made me less lonely because I found folks I liked to talk to.