Anything you've purchased will remain in your library unless:
1) You delete it (which can happen by accident, due to some bad UX).
If you have done this, you can contact Amazon Support and they can re-add it to your library for free. It's not possible to delete your purchase history on the Amazon website, and that includes all Kindle books.
Whenever I've seen people claim that digital content has gone from their Amazon account, it always turns out to be either:
a) They didn't buy it on Amazon in the first place.
b) They bought it on a different Amazon account.