Yes, I think you did the right thing. I live in a condo complex and there are 4 large buildings. Each building has it's own laundry room with 6 washers and 6 dryers. We also have certain hours that we can use it but the door is never locked. There's a table in each laundry room for people to use if they need to.

In the past, I've also waited for people to take their clothes out of the dryer. If they don't come to take it out within 10 minutes, I have taken it out and I put it on the table. People have also done this to me before but I was only about 5 mintues late. I always try to time everything so this won't happen. I've seen some people leave their clothes in the dryer for hours. In our laundry room it even states that if no one comes back within 5 minutes then we should carefully put their laundry on the table so others can use the dryers.

I'm sure that if your clothes were left in the dryer for a while, that someone would've removed them as well. People need to remember that it's a shared laundry room and others need to use it too.