From what ever key you start a minor or major pattern, the the pattern with all its steps and half-steps has to remain exactly the same. For that reason black keys come into play and flats or sharps have to be used to lower or raise the key by a half step. It is important to remember that one scale can only include flats or sharps as key signature.
According to the major or minor pattern we can not avoid black keys. This is where sharps or flats are inevitable.
Tonality is a group or a row of notes that has a fixed interval based structure. Tonality has got a note sounding as a center of the musical material. It is the root note of the tonality. Tonality is related with a certain key and has its name after that key. There are major and minor tonalities for example.