Not a stupid question.
Y will be the cabin of travel, economy, whereas the B or M will be the subclass which corresponds to the fare level applied for each leg of the journey.
To take that a step further, if there are 200 seats in the economy class cabin, the yield management will allocate a certain number to full unrestricted economy fares, and others to more restricted fare levels, youth fares, and so on.