When you afk/leave a game, if it is remade, other people lose 10-15 minutes of their time each (time spent in queue, champ select, loading, and 3 mins in game before remake is allowed). That comes to a total of 90+ minutes of other people's time you've wasted.
If you afk/leave and remake isn't an option, you're wasting the above plus at least 15 minutes of their time before surrender is an option.
If your internet is not reliable, do not play a videogame that relies on reliable internet connection. Either play a non-synchronous multiplayer game (ex: runescape) where you are not dependent on others' internet connection for your success and they aren't dependent on yours, or play a single player game.