I have heard different things over the years as to what counts as an inactive account from staff members here on the forum. It wasn't ever really set in stone until they made all those FAQs, since then I don't think it has really changed.
I believe they also send out emails before deleting an account, but from what others have said here that doesn't always seem to happen, even though they had valid email addresses registered to the accounts.\
I took the easy way out and bought the unlock key for the number I wanted to keep. I figure over the long term it is worth it as I won't have to worry about it vanishing on me one day. Luckily you do have options to try and get the number back if it is important to you.
I can understand why they do it, they don't obviously want thousands of dormant accounts that have gone stale through people not using the service anymore or just testing things out. They have to pay for all those numbers and we don't
They can't make money from the dormant numbers and so the only option would be to buy more if they didn't reclaim them.
I imagine it is quite annoying when it happens to you though. Sorry for that.