This always confuses me. I hope for help from native English speakers who mind their language.
Let's say I have:
x := 5
I can say "x is assigned 5". Fine. But then I bring in a preposition. Which of the following expresses what happens: "5 is assigned to x" or "x is assigned to 5"?
I can get one intuition by drawing an analogy to "the name is assigned to the value", so that would indicate "x is assigned to 5". But then, I can also say "the value is assigned the name" without the "to", which would indicate that "5 is assigned x" would be right, and I absolutely think that is backwards.