Why do aircraft have an unusable amount of fuel?
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':


Fuel tanks on airplanes have complex shapes - they include baffles and other walls (with holes in them) to prevent oscillations from building up during in-flight movement. Sometimes these baffles are even engineered into the tanks late in the design cycle as testing finds oscillation issues. These baffles result in 'geometric trapping' of fuel in nooks and crannies. 
Drawing fuel from a fuel tank is more complicated in a plane - cars are pretty much flat with minor tilts while airframes can have all sorts of odd and sustained directions that the fuel wants to go due to acceleration. Imagine an extended tilted spiral while descending - that fuel experiences far more lateral acceleration over a longer time period that a car would have. Getting the fuel system to pull fuel out from these different angles is challenging (note that I've picked a non-aerobatic maneuver for which the Cessna 152 of your question is qualified here).
All of this is a cost/complexity tradeoff - solutions exist for 1 and 2 above - fighter jets use fuel bladders that have pressure bladders arranged to squeeze the fuel out so that they can get almost all the fuel even at high G-forces and unusual angles. Aerobatic planes have similarly more expensive and complicated systems than the old and cheap Cessna 152.


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.