thats really strange. my cat had a habit of doing that in the past, but it was an unusual situation. i had my cat trained to use the toilet instead of a litter box. he used the toilet for a few months, then i had to give him surgery because he swallowed a toy that got stuck in his intestines. after the surgery he forgot how to use the litter box but couldnt jump onto the toilet...so would go in the tub.
how old is your cat? did you move the location of the litter box at all? to deter him from going in the tub you may want to fill it up with a little bit of water.