What bawang said about White Lotus and the five elements is correct. That's the origin. In early nationalist propaganda it also came to mean the five major ethnic nations of China to illustrate the ideal of a united country as also shown by the five-color flag.