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.
Television has changed in the past 40+ years. In the early 50's, 60's and some 70's, many television shows did 39 episodes, tho only 13 were guaranteed for returning shows and even the newer premiering shows. Once the ratings after 6 to 8 shows said Good, the show was given 13 more, then another 13 if the show was really good in ratings. Thus 39 episdes per year. As time went on, TV decided the number of guaranteed yearly shows would be reduced to 26 or less. When that happened, often a good number of newer shows only began to last no more than 10-12 episodes, especially when the ratings showed "Flop". Some shows have the bad luck of being so bad, they get canned in one or two episodes. Others manage a 12 to 15 number, then go bye-bye. You would be surprised at the number of TV shows under 26 episodes, which either meant, not doing well, or in many cases, doing terrible, lucky to get 5 to 8 aired.