Assuming people are rational and risk neutral the cost of crate + key would be the expected value of items that the crate could drop plus the fixed cost of key. So
$C= E[V] +K$
where $C$ is the total cost, V is the random variable - value of item that drops, and $K$ value of key to crate.
However, once you open the crate value of the item is no longer random, by opening the crate you force $v_i$ to be drawn from $V$ distribution. If you get $v_i$ from bottom of the value distribution (e.g. suppose you get lowest $\underline{v}$. its completely possible it is smaller than the value of key plus crate $ \underline{v} < E[V] +K$.
Moreover, note the expected value can be skewed by very rare but valuable items. Suppose you can get item costing 1000 with probability 0.1 and then with probability 0.9 you get some common item costing 100, expected value of crate for a risk neutral person will be 190, despite that you are unlikely to actually get item with value that is higher than 100.
If we assume people are risk averse values would change, but there are still parameters for which the result above will hold, just with different value/price.
This is similar to lottery, you buy some lottery ticket, even if expected value of lottery ticket is 10 bucks it does not guarantee you get ten bucks. Ex ante, before the ticket is scratched the value is given by expected value of the lottery (if you are risk neutral), ex post - once you scratch it has the value that is on the lottery ticket which could even be zero.