To an airline, a flight that leaves with an empty seat is basically throwing money away; that empty seat doesn't mean you can take less fuel, fewer flight crew members, or wear out the airplane less. Therefore, the empty seat saves the airline no money.
Furthermore, people often miss their flights.
Overbooking is one way to deal with these two assumptions. Assume a certain number of people will miss the flight, and sell some seats twice. Then you don't fly with money-eating empty seats, and you can lower the ticket price a bit, because you don't have to charge customers the cost of those statistically-likely empty seats.
There are other solutions. Don't offer any refunds or reaccommodation to no-shows. The seat was empty, but someone paid for it, so who cares? But customers probably don't like that. The might even like it less than overbooking. I don't know, I don't run an airline. There are options, but overbooking exists for a reason.