Implementations might differ between the actual sizes of types, but on most, types like unsigned int and float are always 4 bytes. But why does a type always occupy a certai
Because types fundamentally represent storage, and they are defined in terms of maximum value they can hold, not the current value.
The very simple analogy would be a house - a house has a fixed size, regardless of how many people live in it, and there is also a building code which stipulates the maximum number of people who can live in a house of a certain size.
However, even if a single person is living in a house which can accommodate 10, the size of the house is not going to be affected by the current number of occupants.