What is transition altitude?
The atmospheric pressure is dropping quite signigicantly with altitude - and this is the very point of the concept of the altimeter - messure the pressure and show this as an altitude.

The basic concept of a flight level is that all high flying planes share a common reference - and do not neet to consider local weather, which can change quite dramatically during a flight. The main topic here is traffic seperation - so all should use the same reference and thus can quite compare their altitudes.

But flying low there is a nice problem called "ground" - planes should mostly avoid it. On charts the minimum altitude is noted, as well as special places like airports. Here a more precise view on the altitude is needed - so pilots need to set their QNH. Before takeoff, before landing - or when flying low for a longer time quite frequently.

But where to change from one reference to another? That much depends on the location - in the US it is mostly 18000, but in other regions this can differ substantially.