(1) InDesign does not store its measurements in the format you enter (or, in this case, taken from an internal list). Everything is converted to points internally. While this reclaculating is done with 15 decimals' worth of accuracy, some rounding will always occur.
(3) A4 is *not* exactly equal to 210 x 297 mm. A0 is defined to be exactly 1 square meter, with a length to width ratio of the square root of 0.5 (about 0.7071). Each next A-step down halves the size, so an A4 is defined to have a surface of exactly 1/16 m². Using the size ratio, that would come down to exactly (sort of) 210.22 mm x 297.302 mm, with loads and loads of less significant decimals. However, that's the official definition!
Thanks on your explanation, but...
Then why my margin values are correct if all is converted to points?
Second and third answer is I think not an issue here.
It's internal bug of InDesign.
I just tried to enter values for example: 298 x 211 mm,
and in script values are correct, without decimals.
So, where is the problem?
If you have some time, just try it...
Use standard A4 from page sizes...
I just found here is the problem!
If you select predefined sizes, you get decimal values,
but if you enter size manualy, then all is ok.
So, It's bug in InDesign...