Why is it legal to buy and sell used books/discs but illegal to buy and sell used digital files? - eviltoast

this contradiction always confused me. either way the official company is “losing a sale” and not getting the money, right?