Why did my chili oil flakes split in two layers?
I've had the same thing happen. My suspicion is that the flakes on top had residual moisture which puffed them up during cooking, or alternatively that other gases were produced by pyrolysis and similarly trapped. Either way, a quick Google image search suggests that this happens fairly often.

Chili oil has to be mixed before use in any case, so I wouldn't worry about it. But if you were particularly unhappy with the look, you could try cooking the chili oil at a lower temperature, or pre-drying the chili flakes in the oven (a few hours at around 120&deg;C should do it).