My betta had the same problem. It got to be pretty severe so I quarantined and treated him with Maracyn to prevent any further damage, but I believe you can just salt bathe your fish and it's fins should recover nicely.
As for why they do it, a number of factors may contribute. Are your water parameters normal? Is your tank planted well enough to allow spots to hide? Could even be boredom. After I treated Roy Cherry, I added several live plants to his tank as well as some cory cats which he loves, I swear. His habits have changed and he seems much more productive, and most importantly, his tail has nearly returned.