The court looks at different things when they initially determing custody than they do when modifying custody. When initially determining custody the court looks at a variety of factors that are similar in most States. These are often called the "12 Factors" or some simliar name. Chances are your State uses some variation of this in their State Statutes.
When hearing a request to modify custody, however, the court adheres to a stricter standard. Not only must have been a change in circumstances, but there must be a "substantial change in circumstances", enough to warrant uprooting the child from the environment he or she is currently in. This is a much harder thing to do in court than making an initial custody determination in most cases.