Why parameterized attribute lookup on ansible variables fail?

This is best explained by this example:

its a dictionary, not an object, the following will get you the result you want:

msg: "{{foo[bee]}}"

Thanx.