This chapter is adopted for the purposes of promoting the health, safety, morals and the general welfare of the community through the regulation and restriction of the height, number of stories and size of buildings and other structures, the percentage of lots that may be occupied, the size of yards, courts and other open spaces, the densities of population and the location and use of buildings, structures and land for industry, business, residence and other purposes; and through the division of the community into districts; and providing fines and penalties for the violation of its provisions.