We know that launching rockets near the coast is safe for human settlement areas in case a failure occurs. But, why does China launch its rockets so far from the coast (near hills)? Many launch sites of China like Xichang, Taiyuan, Jiuquan lie far from the Pacific Ocean except Wenchang. Is there any benefits of launching rockets far away from ocean?
In 2015, part of a booster of a Long March 4C rocket struck a house in Shanxi after a launch from the Taiyuan facility, cutting a sizable hole into the roof. In 1996, a Long March rocket carrying a U.S.-manufactured satellite crashed into a hillside 22 seconds after liftoff at Xichang. Xinhua, China’s state-run news agency, reported that the accident killed six people and injured 57, but some suspect the toll was much higher.
So if launching rockets over land can be so dangerous, why did China build its facilities so far inland?
Perhaps this has something to do with China's geopolitical issues.
Note: I am aware that my question isn't the same as this and this.