I was in upper deck Business Class on a very cheap economy ticket today (errm, last night... whenever) between SIN-BNE and can thoroughly recommend the sky bed!
I'm a Frequent Flyer but probably didn't quite meet any definition of "dress code", if such a test is ever actually applied. However, I don't think it was for either of those reasons, although I am always nice to the check-in staff!
I suspect that, on this occasion, they didn't have enough Business class pax and didn't want to waste the space. It seemed like a very full flight too, so there might've been some overbooking in cattle class.