Your family is not alone. My experience tells me that if there is a custody change, it is most often initiated when a child reaches adolescence. Generally, there are two reasons why this happens. For one, adolescence brings on hormonal changes that can make a previously even-tempered child a little moody, even angry, for no apparent reason. Friendships change and become more important than Mom and Dad. A previously dependent little girl or boy starts to become an independent teen with an independent mouth. That's when a divorced parent is most likely ready to seek relief from the other parent.
For another, and in the child's defense, adolescence is also a time when children tend to gravitate toward their like-sex parent for recreation and just plain hanging out. Of course there are always exceptions, but an adolescent boy has a tendency to seek out his dad for recreational activities like, say, dirt-bike riding or sports. Girls do the same thing with Mom '- plus they feel far more comfortable talking about the changes to their bodies with Mom than with Dad. So, if a boy is being raised predominantly by Mom and a girl is being raised predominantly by Dad, a desire to switch at adolescence should not be a surprise.
But this does not help the unsuspecting stepparent who has based her life on not having children. Plus, as you have seen, the previously noncustodial parent '- in your case, Dad '- is pleased as punch that his child has finally come to live with him and, as a result, overlooks indiscretions that should have been nipped in the bud.