this question has been bugging me for a while now! I was drawing boxes over some squares in a book and then wrote 1cm and 10mm for the line length, and when I calculated the area I realised that the areas were not the same but they occupied the same amount of space.
Am I missing something obvious or is there an explanation?
Attached is a diagram of what I mean. All squares of the same dimensions for mm, cm and m.

You haven't made a mistake, and the areas are equal. It's just that $100mm^2 = 1cm^2 = 0.0001m^2$ is the actual relation between the different area units. What you have done here is a correct proof of that fact.