It's often in the writer's contract that rights revert after a certain period, or if the book goes out of print, or if the publisher has not exercised the rights in the contract. Even if it isn't, a digital version might increase sales of a physical version, and some money is better than none.