It does make sense if you think about it. In the "grey" version, you perceive it as grey since it looks like there is a transparent yellow layer, and based on the surrounding, it looks like the element itself is just grey rather than yellow (even though there is a yellow tint on the object due to the layer).
But, with a blue transparent layer, there is no yellow to add on from the layer, so the object itself must be yellow in order to show through as such. So our brain makes the appropriate adjustment. Very smart. We see what the actual object probably looks like, rather than the exact colors.
The classic optical illusion with a rubik's cube with a side in shadow is basically the same illusion.