Confusion is a non-violate status condition, so one that goes away when you switch out. For the violate status conditions, like the ones you mentioned, you can only have one of them at once. And sleep is one of them, so that's why rest doesn't cure confusion.