Airlines will fly with empty seats if they do not have enough people flying to book those seats and they still make a profit.
Although airlines prefer to have all seats filled they may not always be able to do that because during certain times not as many people fly.
So the airline charges enough for the seats to make up for the empty seats so they don't lose as much money.
Even with some empty seats the airlines are still making a profit while still flying the plane with half the seats filled.
Just like a bus may not have all the seats filled they still make a profit by charging enough.
Now in the pandemic they are keeping some of the middle seats empty to avoid the spread of germs and to allow social distancing.