So basically you're saying LoL is your first online game ever and you yet have to come to terms with online gaming and how it works.
You have to realize that this is online game played through** internet** and on PC that needs electricity and that it is played by human beings.
Now if oyu think about it:
GAME is just a piece of code, and Riot themselves said it's badly coded. Even if that was not a case, there are so many processes and data exchanges going on when you play, that there is always a chance something would collide and result in a crash of the game. Sometimes simple restart is enough, sometimes you get fckd and can't reconnect for hours. Sht happens, you should always have this in mind while playing games.
Just look at me - I bought Elder Scrols Online, played for 2 weeks, then new update happened that totally fckd me over and now I can't play for 2 weeks, no solution I could Google helped and now I am at the mercy of Bethesda support team who takes their fcking sweet time about it. Never anything like this happened to me before in 15 years of my online gaming career, and yet here it is, game I spent £50 is unplayable. Go figure.
INTERNET can die anytime, to anone. Internet provider's network may go down any time and there is no guarantee of warning it'll happen, since it's impossible. Except scheduled maintenances or downtimes. So every time you go onloine there is fair chance the connection will die. Luckily nowadays it's not that common but it still happens.
PC are unreliable. They crash and glitch all the time, just because they can. Something may melt, overheat or just break down, sometimes user spills some liquid into their case or all over their laptop... that can happen anytime.
ELECTRICITY may go down as well. It's rare nowadays, but still it happens. All you need is one small malfunction or a powerfulm storm. Easy as that.
PEOPLE last but not least are the most unreliable of this list. Many different people play this game so many reasons for their AFK are possible - rage quit because your team is bad, they may leave because some rare pokemon just spawned 10 metres from their house, they may answer telephone, some incident may happen in the house, their kid/sibling may get hurt and they need to attend to it, parents come home angry because kid didn't do its home duties and they unplug the internet... there is 1000+1 possibilities when people may go offline for a reason.
Take all these reasons, put it together and you'll see that anytime you go play online - ANY GAME - there is fiar chance someone would DC. So youhave 2 options:
A) Get used to it and stop whining
B) Play offline games only
Every online game is a roulette of - is something going to happen so someone will go offline suddenly.... or not? ANd in LoL, where 10 people are present at the same time, the chances of someone going offline are higher by 10% at least.