Why is there a weight limit for carry-on luggage on some airlines (e.g., 7 kg for China Airlines) that is enforced even when the plane is almost empty?
At what point should they not enforce it? Half full? Quarter full? Can you imagine the arguments!
And then - when you are packing at home, most passengers don't know how full the plane might or might not be. So it's a bit impractical.
Logically it's more sensible to enforce a limit, and then gate agents might just have an unofficial policy of some leniency where they see fit.
The weight of the luggage affects the fuel consumption, and the airline might very well adapt how much fuel the put on the plane to the number of passengers. If they were to allow all the passengers to bring extra luggage, just because it fits, they would use extra fuel, and have to pay for that.
It's probably also easier to enforce the limit at all times, rather than taking countless discussions with passengers on whether slightly overweight luggage is acceptable on a particular flight (and people would start such discussions if the airline did loosen those rules).
The main reason for the weight limit (and its enforcement) is that the airline wants you to pay for the extra weight. It is a major income stream.
Once you pay the fee, the plane can easily fly with the extra weight. Unless you bring an extra ton, it is just noise for the needed-gas calculation - they wouldn't add more gas just because a passenger brings an extra heavy carry-on (or is overweight himself).
I don't think these limits exist for one reason only. Each airline analyses the pros and cons of their options and set a limit.
Besides the already mentioned reasons I am presenting a few other:
The weight limit in carry-on luggage also relates to the maximum weight the overhead compartments can hold. Although sturdy there are limits. I could not find an official source mentioning this but found people mentioning this here and here.
Since flight attendants often help with those bags, it's possible that this limit is also a way of protecting the cabin crew.
Yet another reason to keep a limit is safety. To avoid the baggage-retention-related incidents as explained here.
Your question is if the plane is almost empty. Of course, the fact that the plane is almost empty is not known to anyone when packing. To allow this the airline company would have to inform customers about the weight limit increase in a clear way beyond any doubt. Even with the existing fixed limits, there are already tons of questions (as you can easily find in SE) about luggage weight. This uncertainty would only bring extra costs in customer support and time loss when boarding customers.
Even if this was feasible in a practical manner, companies may be unable to predict how many passengers there will be for a given flight with enough anticipation. If there is a delayed flight they might have to re-route customers filling what was previously an empty plane.
There is no reason for the airline to not enforce the rule, regardless of how full the plane is. Customers will either pay to put their bag on the plane, or they will pack less. Even if the plane is nearly empty, the airline has an opportunity to collect baggage fees, and they have no compelling reason to waive that opportunity. Why would they refuse to take $25+ from anyone who wants to check their bag?
For one: to be safe.
There is an average passenger weight (which includes also carry on baggage). This affect the configuration of the airplane, the required fuel, and the emergency fuel.
Because these calculations are done by maybe by dispatcher, but the pilot need to verify and input in the plane computer, one do not want that there was different opinion on the inserted numbers, and so maybe going on low fuel (and this means paperwork and possibly penalties, but for sure an expedite landing, so good for passengers).
Additionally carry on is checked on very last moment. How do you know that airplane is half full? If your estimates were wrong, it will take time to correct, and it could cause delay to the airline (or just denied boarding). Maybe at last minute an other airline has to cancel a flight, so they will rebook many passengers on your flights (and this will take some time, do load new baggage and doing the new paperwork), but so now you have extra weight which was not accounted.
Let's also say: it easy money for airline, and so they enforce such rules, OTOH the average weight seems to be lower then modern passengers.
As many have said, it affects the weight of the plane, which other have said affects how much fuel the plane consumes, which of course costs the airline money. However, one thing few, if any, have mentioned is the safety implications; if the plane is heavier and it needs to make an emergency landing, there are implications that are going to be needed, such as time and fuel dumped. Additionally, there have been accidents on the smaller (turboprop) planes that have been attributed to excess weight on the plane (here is an example). I'm not particularly sure how much this relates to the decision of airlines themselves to charge extra for extra baggage, but do keep this in mind.