Imagine you only came to Illinois because your ex-husband got a new job. This is not your home. You never liked it, and the only thing you've wanted since you got here was to be closer to your family. But you're a mother and you share a child with your ex, so you're not free to simply pack your bags and go. There are legal procedures that must be followed or you could risk your parental rights.
When parents have shared legal custody -- even if the child lives full-time with one of the parents and the other parent has visitation rights -- the custodial parent (whom the child lives with) will usually need to obtain permission from the other parent before moving away. Without said permission, the noncustodial parent with visitation rights can block the other parent's move. Most child custody decrees and agreements specifically state that neither parent can move to another state without the other parent's permission. Doing so without court approval could cause the parent who moved to lose custody.