I get asked this question all the time. My personal reason behind the onside kick, is because it limits the options for success for the receiving team. If you don't have a kicker who can kick the ball deep - with adequate hang time, and I mean endzone deep, it really doesn't make sense to allow the returning team that much space to operate. Think of it in relation to open space. An eleven man team has 50 yards across the field to cover with 10 men, (typically the kicker remains behind and is the safety valve). Kicking it deep in 6-man, or with no hang time, asks the kicking team to cover 5 yards less on each side (40 yards), with half the players. Teams that don't have a solid kicker, but continually kick deep, still allow the returning team to reach the 30 yard line or better; however, the possibilities of a touchdown increase exponentially with every kick.
I had the luxury, in Mount Calm, to kick out of the endzone whenever I liked, but still had the option to onside kick. This is optimal, as it doesn't allow the best receiver to know where the ball is going. Unfortunately, a kicker like that isn't in every town, so it only makes sense to optimize your field position, while limiting the possibilities of success for your opponent. It's not as flashy, and doesn't offer the bone crushing hits; but's it's safe. It's really no different from walking a good hitter with first base open, or fouling someone to make them shoot free throws rather than giving up an easy layup. They're not always the popular choice, but if they offer your team the highest opportunities for success, it's really an easy choice for me.