One of the most important things to heed in English language spelling is that the language combines several other languages especially Latin and Greek.
This leaves the language so rich in vocabulary but also comes with disturbing variations in spellings as well. Many sounds are not written as they sound and at the same time a single sound can be spelled with different letters or group of letters.
In this context sound /ch/ can be written with letters /ch/ or /tch/.
The rule for where to write what is first in the length of the vowel that comes before sound /ch/. For a vowel to be called described short or long, it depends on the sound made at its position in a word.
When the vowel preceding sound /ch/ is short, use tch and when it is long use letters /ch/.
For example: witch, catch, botch, kitchen and sketch have short sounds at the vowel preceding the sound /ch/ and that is why tch is applied.
By now you can predict that words such as beach, ranch, lurch, church and munch have long vowels before sound /ch/ and therefore do not take the t but remain /ch/.
But as we said above, the rule has variations and that is why you will find words such as which, rich, bachelor and attach all have short vowels before sound /ch/ but they do not take a tch.
Sometimes letter t is used to represent sound /ch/ in a word when the sound /ch/ is followed by letters ure for example in picture, juncture, nature and rapture.
You may also need to know that before the 15th century the English used letter c to represent sound /ch/ in a word and words like chin and kin could be spelled the same. The adding of ch was adopted from other language to avoid confusion in words such as chin and kin.
The adding of t to make /tch/ came as a result of the rules regarding doubling consonants in words. The English decided that instead of doubling ch to write catching, adding t to /ch/ to write catching would be better.