I noted that there is typically a maximum of 24 episodes per a season in a TV show. What is the reason for that?
There are 52 weeks in a year. American TV series usually go from the end of September to May, about 34-35 weeks.
Most shows go on hiatus over the winter holidays and thanksgiving, due to lower viewership. Events such as the president of the United States giving a speech, also usually means that there will be no new television that night. In the 2012-2013 year, there were 3 presidential debates and election night, so there was no new television for any of those nights. Some episodes end up not being shown on the originally-planned day because of being pre-empted by athletics games. There are some series that have 2-hour specials which cut into other shows at certain points in the season.
In order to have time to air all the episodes produced, the networks generally order seasons of 22-26 episodes.