In order to provide appropriate facilities for the housing of wards of the juvenile court in the counties of their residence or in adjacent counties so that those wards may be kept under direct supervision of the court, and in order to more advantageously apply the salutary effect of a safe and supportive home and family environment upon them, and also in order to secure a better classification and segregation of those wards according to their capacities, interests, and responsiveness to control and responsibility, and to give better opportunity for reform and encouragement of self-discipline in those wards, juvenile ranches or camps may be established, as provided in this article.