If you have an AFK, that's completely different from simply giving up. An AFK makes the game legitimately unfair and isn't really worth playing anymore.
However, there are several types of early surrenders/giving up; some of those being people that play in the moment and people who play forward. People that play in the moment tend to misjudge the situation because they died a couple times, and aren't getting the support they want.
However, there are also those that see ahead. They tend to see how the game will go after the current situation. A good example for this is if bot lane is being pushed up while the support, ADC, or both just got killed without any help, just 2v2; after this, the top (either fed or badly matched) frees his lane while enemy jungle doubles ally jungle and mid 2v2.
Much more common is the situation of a lane that's just doing fine, but allies start dropping and they then get ganked by the other lanes that just got fed, now taking the first lane with them, crushing any chances of coming back due to simply being behind in xp/gold.
If most of that happened in the laning phase, you have almost no chance of coming back. If you're level 6/7 or lower and the enemy gets a quadra or even ace, you've lost and it's better to surrender so that you can get into a new match quicker because fighting a team you have no chance against helps almost no one.
There are also certain times where you can tell a champion is snowballing and won't be able to be stopped without most of your team later, and a lot of times the people that give up see this. I think most of the problem is either 1. the player just doesn't really want to try and is just a wimp or 2. they see something that will significantly hinder the team's chances of winning and don't want to waste time on a game they will lose that early in the game.