This happened a lot with AC when they rolled out premium economy, and still happens to some extent. The cabins' inventories are managed differently.
Just this morning I was looking at a UA flight that was Z9 P0 Yx Bx M0. Z was a couple dollars more than B. If there had been P space, it would have been cheaper.
On AC, between the three cabins, I've seen situations where prices are completely inverted (Y $1500, PY $1300, J $1200), and every combination of absurdity. Excluding mistake fares, it's usually because of something like J9 P9 O9 A5 R0 Y3 B0.