In dance music the emphasis is on 4 beats in the bar and therefore two or four or eight bar patterns (or larger such as 12, 16, 24, 32, etc.)
However in Art music (what most of you cats would call Classical Music (a very short period in music history [1750-1827], but it sticks nonetheless)) it is quite common to have 5, 9, 11 15 bar melodic phrases (Bach, Mozart, Beethoven all did this, to name a few).
Later composers came along and said phrases must be equal in length for beginning composers, to eliminate the problems of handling odd number bar phrases - there are issues in harmony and continuations. It was also roughly the time that dance music became popular with the new middle classes (mid-1800's) at large public dances (called balls at that time). When dancing any of the choreographed steps such as the waltz or the polka, you need to have an even number of bars so that dancers do not get lost.
From this time forward all dance music (pop, jazz, blues, etc.) has been composed to fit this pattern of predictable phrase length and tempo.
This has been translated into the approach we use in creating dance music today, even though there are no choreographed steps that the punters would use, we are stuck in the time-warp that we must provide certainty of beats and bars