Charging Gas for reading a view function in a transaction seems odd

I just cant get my head around why view functions which are gas free suddenly cost 5k gwei when sandwiched between a state transitioning function which just uses the view function like a web3 call.