I learned from this question that a Cessna 152 holds 5.6 litres of fuel that it can't use.
Why would it be designed to hold fuel that it cannot burn, especially since water contamination of fuel is a concern?
Pilot here (with Cessna 152 hours) as well as an engineer who made it most of the way to an Airframe and Powerplant technician license at one point in life.
There are several reasons that conspire to produce 'unusable fuel':
There are other considerations as well, but mostly it comes down to whether the plane in question can justify the cost and effort to get every last drop of fuel.
Things get even more complicated in rockets - the moon rockets (properly the Saturn 5 although it was an upper stage specifically) had special extra engines called ullage motors whose only job was to give the stage a little boost in space to push the fuel towards the rear of the rocket so that the main motors could draw fuel and start.
Addendum edit: @supercat below - the definition of unusable fuel is set by federal aviation regulation part 23, section 959 (FAR 23.959) and basically is the worst case under "intended operation" for the particular plane. Since the Cessna 152 is not aerobatically rated, for example, the unused fuel is defined as the fuel level where SOME intended maneuver would be capable of causing a fuel system error. In practice, especially in flat level flight, some of that unusable fuel would be available for use although you are not supposed to plan to use it in your flight planning.
especially since water contamination of fuel is a concern?
That's one of the reasons. Fuel floats on water, so water collects in the bottom of the tank, along with other gunk. By not taking the last dregs of fuel from the bottom of the tank you avoid putting this stuff into the engine
Almost any system that moves liquid around will retain a certain volume. In your case, there are various bends in the pipes and some of those bends go up. Yes, it's gravity-fed but notice the shutoff valve on the floor. Now notice the level of the carburetor. Any fuel below the level of the carb bowl is unusable, as we have no way to push it through the rest of the plumbing without more liquid behind it.
If we turn to things with a pump the unusable quantity can go up, a lot. The volume of liquid between the pump and the final destination would be considered unusable for the same reason - once the pump is dry we can't move it along anymore.
One restaurant manager I used to know installed a metered drink dispensing system. All the booze is in the (locked) storage room, the bartenders push a button and exactly one ounce comes out of the tap. The only complaint he had was that the system cost $500 to prime, per item, and he had to keep thousands of dollars of "unusable" alcohol on the books.
The term "unusable" is a very special definition. It comes from a specific test described in FAA FAR Part 23. It is not the same as the common sense meaning of the word "unusable".
For single engine light planes like Cessna 152, FAA FAR Part 23 requires the available fuel flow to be 125% of max engine consumption. 150% for pure gravity feed systems. At certification test the fuel flow is measured while the level is dropping in the tanks. As soon as the flow rate goes below 125 or 150 % all remaining fuel is declared unusable. This shall be done with the plane supported in climb nose up atitude.
So, the formal term "unusable" means this last amount of fuel might be unavailble in a nose up attitude at full engine power.
In level cruise you can normally empty the fuel tanks to the last drop.