This has to do with the purpose for you with need a symbol or alphabet with which you want to denote a mathematical entity. Examples:
When we want to denote a number tend to think of the letter n because that is the first letter of the word number.
Similarly, when we want to denote a prime number number theorist usually use the letter p because that is the first letter of the word prime.
When we want to denote an iterative step/process which repeats a finite or infinite a number tend to think of the letter i because that is the first letter of the word iteration.
Naturally when you want to denote the second iterative step/process within the same calculations we tend to think of the letter j because we have already used up i so be automatically go to the next available letter j. Similarly we have one more iterative step, k is the logically the next preferred letter.