Air is made up of all sorts of different gasses, particles and moisture. As a result, air is irregular and uneven so when a lightning channel begins to form, it takes the path of least resistance.