That's about the age when a lot of them do that. My son was a year or so when he went through that phase. I think it happens more often if you have a child who wakes up and doesn't start screaming for attention. They wake up, have nothing much to do while they're awake but in their crib, and they figure out that they can busy themselves by taking off their diaper or clothes. The phase passes, but it's a messy one, no doubt about that. If you can beat them to being up and awake you can head that off, but some of them wake up awfully, awfully, early in the morning.
The biggest concern with that is that if a child wears disposable diapers and figures out that removing the diaper involves picking it apart, piece by piece. There's a choking hazard with that if they do that.
As far as I could ever guess, there wasn't any particular plan to first remove the diaper and then go. I think it was more a matter of finding something to be busy with while awake, but once the diaper is off - well, that's what happens. Also, though, the diaper that's been on for awhile may already be soiled, so you there you have that disaster!
Using sleepwear that zips up the back (if you can find any) or is otherwise more difficult for a baby that young to remove is kind of the only thing that helps as far as I've ever guessed. Or, if it happens when she wakes from a nap (and you're already awake anyway) maybe a baby monitor would tip you off when he wakes up.
Something else you could try (because I'm not entirely positive my theory about motivation is correct) would be to have some kind of activity in the crib (but be good and sure there's absolutely nothing your child could take off the toy/activity, and that the toy/activity (maybe a baby book of some kind) isn't one that could be picked apart and turned into a choking hazard too. If they're at some "dexterity-developing" stage they'll pick apart whatever can be picked apart. :)
I could be wrong, but I don't really think it's necessarily a sign that the child is ready for toilet-teaching. I tend to think it's more that some babies are more likely to yell for attention while others tend more to "entertain themselves" by finding something "interesting" to do. Again, I could be wrong.