because that's what the uni teaches. there shouldn't be any difference in code, but you must know how to work with both compilers, so you can port code on the fly. take interrupts, for example. when your teacher will explain you how to do them, he will explain in picc lite. if you will type what he says in ccs, it won't work (mostly). he doesn't want to come and debug, because he knows you have a different compiler. so it's easier for everyone to use the same compiler.
of couse you can program it in another language, or with another compiler, since what matters is the end result (hex)