Losing sucks, especially to people that have acted like jackholes or people you don't like. If you lose, shaking hands after the game teaches you to keep your composure and not let your emotions get the best of you. Conversely if you win, you also have to keep your composure and not gloat. Show your opponent respect first and then you can celebrate.
Learning to control your actions when emotions run high is a very important lesson to learn because there are real world serious situations where this is needed. Sadly, with all the domestic violence issues we've seen in the news, we know that people are not doing a good job of controlling their actions when emotions run high. The handshake line isn't the end-all be-all to solve that problem but it is a good way to practice self-control and getting rid of it in college sports would be a mistake.