It's for wing bending relief (for cantilevered wings ).
As the generated lift bends the wings upward, the weight of the fuel will counter that.
As the plane loses weight in-flight due to burning fuel, so does the need for wing bending relief (less weight → less lift), that's why the wing tanks are the last to be used.
For context, a Boeing 777-200ER can hold 29 tonnes of fuel in each wing, and each wing measures ~27 metres and is self-supported.
Example:
Let's say in our airliner each wing tank holds 100 units (200 total for both tanks), and the center tank holds 200 units, and you have a flight that needs 200 units of fuel.
Correct scenario: By filling only the wing tanks, the weight of fuel in the wings will counter the bending of the lift.
Incorrect scenario: By filling only the center tank, the wings will bend a great deal (maybe even beyond their design limit).
This is not good, and even if it is within the design limits, the repeating [avoidable] stresses will shorten the plane's lifespan .
Example for order of use (schedule):
Our flight needs 300 units, based on the above, we will fill the wing tanks, and fill half the center tank.
Correct order: By emptying the center first, we have extended the duration of the wing bending relief.
Incorrect order: By emptying the wings first, we lose the wing bending relief, while the plane is still heavy.
Related:
How is fuel stored and routed on a trijet with one engine at the tail?
aviation.stackexchange.com/users/14897/ymb1
Having all the payload of a plane concentrated at the fuselage creates a large bending load on the wings in order to support that weight.
Storing fuel in the wings allows some of that weight to be placed at the same place where it's being supported, in the wings.
Distributing the weight into the wings reduces the loads where the wings meet the fuselage.
aviation.stackexchange.com/users/1696/fooot
A minor point - keeping less of the flammable fuel in the body has a safety benefit.
Using up what's in the body first helps keep it further away from the crew and passengers.
In a crash you'd prefer the fuel to not ignite, but of the two locations, its better burning out by the wings than inside the main fuselage.
aviation.stackexchange.com/users/12591/Criggie
Probably the main reason why fuel is put into the main wing tanks first is because on some airliners (if not most) the engines are fed directly from the wing tanks.
Some airliners have to pump the fuel from center tanks into the wing tanks before the engines can utilize the fuel.
So for example, if the flight requires 10,000 pounds of fuel, and each wing can hold 5,000 pounds, plus the center tank holds an additional 5,000 pounds, then you don't want to start in the belly tank, because you'll end up with 5,000 pounds in the belly, and 2,500 pounds in each wing.
Then the flight crew will have to do a fuel transfer in flight of 5,000 pounds from the belly tank into the wings.
Imagine if the flight only required 5,000 pounds and you started in the center tank.
You would end up with the full fuel load in the center tank.
When the flight crew arrives to take the plane they will have to transfer fuel into the wing tanks before take-off.
If you are topping off the aircraft, it won't matter if you fuel the belly or wings first.
However, another consideration, which is not part of your question is weight and balance on the ground when the aircraft is empty.
Some aircraft like the older DC8 has like 8 or 10 fuel tanks in various locations, some are forward of the CG and some are aft of the CG.
However, the fuel tanks in the root of the wings are usually slightly forward of CG which helps to prevent tail tipping.
aviation.stackexchange.com/users/22661/Devil07
The simplest explanation is that the wings are designed to be the load bearing structure in the air and on the ground.
So, you want the most weight to be in/on the wings.
In other words, you want to keep the weight stress on the wing structure as opposed to the fuselage because the wings are designed to carry weight.
Wing tanks are loaded first because:
That keeps the most weight on the wings.
They will always be loaded.
Center tanks may not be fueled at all on shorter flights.
Fuel is then consumed from the center tanks first to keep the most weight on the wings through the flight.
aviation.stackexchange.com/users/21835/Johns-305
The weight from the fuel will counter the upward bending of the wings, as nothing but the wings alone must bear the load of the cabin, and all of its passengers/cargo.
Using fuel from the wings last will decrease stress on wings, and the joints between the wing and cabin.
aviation.stackexchange.com/users/24673/rshah
When fueling airliners, why is fuel filled first in the tanks in the wings and then the center tanks? And why do they use fuel from the center tanks first and then from the tanks in the wings?  From my research I've found the purpose is not to give too much stress to the structure of the wings, but I don't understand exactly how it works. How does having fuel first in the wings and leaving it last in the wings help protect the structure of the wings?
Why are fuel tanks in the wings filled first, and why are they used last?
aviation.stackexchange.com
<airliner><fuel-tanks><refueling><fuel-systems>
aviation.stackexchange.com/questions/42613
aviation.stackexchange.com/users/20179/lemonincider
Having all the payload of a plane concentrated at the fuselage creates a large bending load on the wings in order to support that weight. Storing fuel in the wings allows some of that weight to be placed at the same place where it's being supported, in the wings. Distributing the weight into the wings reduces the loads where the wings meet the fuselage.  the weight stress should be kept on the wing structure as opposed to the fuselage because the wings are designed to carry weight.   The main reason is because wing bending relief is necessary, so the wings must carry most of the weight  as opposed to the fuselage, as they are designed to do. The wing tanks are filled first because in some airliners, the engines use directly the fuel from the wing tanks. Another reason is safety; if there is an accidents and the tanks ignite, it is best that the main fuselage is as empty as possible.
The main reason is because wing bending relief is necessary, so the wings must carry most of the weight  as opposed to the fuselage, as they are designed to do. The wing tanks are filled first because in some airliners, the engines use directly the fuel from the wing tanks. Another reason is safety; if there is an accidents and the tanks ignite, it is best that the main fuselage is as empty as possible.