The purpose of this bylaw is outlined in the provisions of MGL c. 40A, as follows:
A.
For the purpose of promoting the health, safety, convenience, morals or welfare of its inhabitants, any town may, by a zoning ordinance or bylaw, regulate and restrict the height, number of stories, and size of buildings and structures, the size and width of lots, the percentages of lot that may be occupied, the size of yards, courts and other open spaces, the density of population, and the location and use of buildings, structures and land for trade, industry, agriculture, residence or other purposes; provided, however, that no ordinance or bylaw which prohibits or limits the use of land for any church or other religious purpose or for any educational purpose which is religious, sectarian, denominational or public shall be valid; and provided, further, that in regulating or restricting the size of such buildings or structures, no provision of any ordinance or bylaw shall be valid which requires the floor area of the living space of a single-family residential building to be greater than 768 square feet.
B.
For any or all of such purposes, a zoning ordinance or bylaw may divide the municipality into districts of such number, shape, and area as may be deemed best suited to carry out purposes of this chapter, and within such districts, it may regulate and restrict the erection, construction, reconstruction, alteration or use of buildings and structures or use of land, and may prohibit noxious trades, within the municipality or any specified part thereof. All such regulations and restrictions shall be uniform for each class or kind of buildings, structures or land, and for each class or kind of use, throughout the district, but the regulations and restrictions in one district may differ from those in other districts. Due regard shall be paid to the characteristics of the different parts of the city or town, and the zoning regulations in any city or town shall be the same for zones, districts or streets having substantially the same character. A zoning ordinance or bylaw may provide that land deemed subject to seasonal or periodic flooding shall not be used for residence or other purposes in such a manner as to endanger the health or safety of the occupants thereof.
C.
Zoning regulations and restrictions shall be designed among other purposes to lessen congestion in the streets; to conserve health; to secure safety from fire, panic and other dangers; to provide adequate light and air; to prevent overcrowding of land; to avoid undue concentration of population; to facilitate the adequate provision of transportation, water, sewerage, schools, parks and other public requirements; to conserve the value of land and buildings; to encourage the most appropriate use of land throughout the city or town; and to preserve and increase its amenities.