Yes , statweights value depending on your curent stats .
But , for like 99% of specs rn, its main stats > first stat>seconds stat etc etc etc .untill hard DR which is like 1k + of stat ? Not sure rn about that .
So for example leta say u are DK , your main stats are str mastery haste for content X .
So if u decide u doing content X u stack ilvl as high as posible for str ( it also look beter when puging , idk if there is bag ilvl ) if u have highest items posible u got for mastery as thats your main stat in that content, until u hit hard DR , then u go your second best stat .
Or u can just sim yourself every time just like u will do when u “calculated” your stat weights.