Why we use context-free grammar for parsing?
Because regular expressions are too weak and context-sensitive languages are too difficult to parse. More specifically, regular expressions can't specify that the brackets in your program match up; determining whether a string matches a context-sensitive language is PSPACE-complete (so probably takes exponential time).