Also, @Trebla explains things quite well here:
https://boredofstudies.org/threads/the-atar-part-1-unlock-the-weird-inner-workings-of-atar-calculations.390443/
It's also quite an entertaining read (you'll understand once you read the whole thread 😂😂)...
Hope it helps!