All classical, romantic and a part of the more modern compositions have been written in certain tonalities. The first textbook of the school I Am Studying clarinet was first done in the tonality of C major, and then followed in F major, G major and other tonalities easier for reading and playing. But, there are 24 tonalities in music (12 major and 12 minor), so you will play compositions in other tonalities too.
Tones of one tonality, arranged gradually in height, make the scale of that tonality. Each instrumentalist must have a good theoretical knowledge of the sequence of tones in each scale and learn a lot of fingering it is played with. Over time and practice it becomes almost automatic action. This does not mean that you should play them mechanically, but control (listen to) all the elements of good playing. By playing scales you practice the use of tongue (an attack, coordination of fingers and tongue, staccato a combination of staccato and legato, etc..), good intonation, and uniformity of rhythm, color of the tone and register.
Taken from my book