If you think about for a second as soon as the bolt stops you can only measure just the length that went all the way in.
Same for the bolt with a slight angle at the head, a countersink will allow it to sink further into the material at hand so you would need a full measurement from top to bottom, which makes for perfect sense.