We are talking recreational sports, mainly amateur in nature which are played by people in their leisure time
From a society perspective there are times when a majority of worker take that time off at the same time, usually evenings and weekend, and these are traditionally the time recreation sport especially team sports are played.
Many of these sports then need scarce resources to enable them to be played, traditional team sports very often need a ground or venue, and teams tend to associate themselves with a venue as their home facility.
People also tend to want a routine, so Wednesday evening in the summer might be netball, or Saturday afternoon cricket, or Sunday morning in the winter football
Sports people are competitive and want to measure their performance over a set of matches , a season, against other teams of similar strength
So in organised sports we end up with people playing their sport in leagues at set times in the week at clubs which play at a set venue in contests with other clubs, so we get the concept of home and away matches. The clubs want to make maximum usage of their home facility to increase participation and for economic reasons so may well have 2 teams sharing any given ground
So the problem is to maximise the number of games which each club can play making best use of the facilities
There is another factor, integrity of the competition, which means it would be viewed as unfair for one team to play its last match after all the other matches in that league have been completed or get so far ahead of behind in terms of number of matches the team knew what outcome each possible result would have. Playing at home is often seen as an advantage and it can be seen as unfair for a team to get that home field advantage several times in a row and definitely over the course of a season most sports leagues would expect each team to play as many home matches as away.
Add that all together and that is what a good schedule of fixtures makes possible
There are lots of different answers. there is also not a 1 size fits all answer.
Consider the case where every ground needs to be used on every fixture day to maximise capacity. If that is the only of most important constraint then the solution would be different to a situation were only a few facilities were shared but the some of the facilities where only available on some of the playing dates.
then is it more important everyone plays at the same times and on the same dates, and if everyone plays each other twice is it more important they play teams in the same order in the return fixtures
There are then constraints introduced by the nature of the competition. What if there is a 10 strong premier division of the elite teams, and then several 8 or 12 team divisions organised in a local structure with teams in the premier structure sharing facilities with teams lower down or a set of divisions has a mid season break and the other carry on playing