Since people are jumping on the bandwagon with their experiences, in my very frequent visits to Madrid, I do recall there often being a person by the exit after the baggage carousels in Barajas that would do spot checks of people's baggage tag affixed to the bag and the stub they have. They stopped me a couple of times, but it was nothing inconvenient and, in a way, I am glad they did.
P.S. The fact that Spanish baggage handlers take an age for the bags to arrive to the belt does mean that even the worst of queues in immigration are not an issue