I have used several websites to generate color schemes including Adobe color, coolors.co, etc. All of them generate only 5 swatches per scheme. I want to know exactly, why is the number 5?
There aren’t just 5 colors in a color scheme. Sometimes there’s only two colors. Sometimes there are many more than five (when shades of the primary few colors are included as well, for example).
The number of colors in a color scheme should be part of the design process for a given project. Personally, when I’m designing something, I don’t try to decide the colors I’m going to use for the most part until late into the project. I like to work in blacks and whites until I get most of the pieces I want fleshed out, then I go back and add as much or as little color as needed. As such, I never really choose a specific number of colors in my palette, but I rather end up with a certain number at the end of the design process.
 Sometimes I play around with colors to decide the feel I want in order to design pieces in a certain way, but I rarely decide on a particular palette of colors early on in the process.
As for why certain color generators only generate 5 colors, we can’t really answer that because we’re not them. Other generators generate other amounts of colors.