Purpose of 2 serial resistors on voltage divider
It's typically done to meet reliability requirements for safety.

When operating from a hazardous high voltage, a circuit needs to have Single Point Of Failure (SPOF) protection to meet safety approvals such as CE. Specifically, a hazardous voltage is usually that above 50 Vac or 120 VDC, but the requirement is stated in the standards that the equipment must be approved to. It certainly applies to your 400 VDC here.

Designing for SPOF means that the effect of a failure of a single component will have on the circuit needs to be considered, for every component. For SPOF, 'failure' means that the component fails short-circuit or open-circuit. Components don't all fail this way in real life but this is how it is considered in SPOF. The circuit must not cause further hazards, such as fire, harm to people or over-rating of other components, when a single component has failed in this way.

Considering SPOF here, a single series resistor from 400 V could fail short-circuit and deliver 400 V across the 1 K resistor and the output. So two series resistors are used instead, for SPOF-level protection. If one fails short-circuit, the other must still be working since we are considering a single point of failure.

Each surviving resistor must be rated to the handle the full voltage and power it would then have to deal with. So here, you would need 1 M resistors rated for 400 V plus the tolerance of your supply plus a safety margin (500 V or higher?). And the power rating needs to be for the highest 400 V supply voltage across a single 1 M resistor and the 1 K, with derating. So lets look at 160 mW dissipation and use at least a 320 mW resistor e.g. 1/2 W.

Next, if the 1 K fails open-circuit, the 400 V through 2 M source impedance will be delivered to your output. So that needs to be considered also. You could use a second parallel resistor and make both 2 K. A failure of any of the four resistors you've now got will affect the potential divider output voltage, so that must be allowed for. If it's just detecting the presence of 400 V, suitable resistor values would let the output drive an NPN transistor or voltage comparator that'd work from any of the three output voltages caused by the three possible dividers (2M:1K normally, 1M:1K, 2M:2K). If you're trying to measure the 400 V, you could add a second and third identical divider circuit and put them through a majority voting circuit to identify the correct voltage (two of the three voltages nearly the same). There are different ways of doing these things but they all affect cost, peformance, space etc., so they need careful consideration.

This may not be the original reason that your circuit here has two series resistors, I don't know the application or its requirements. But its a reason why it should.

Designing for reliability, safety and EMC are often forgotten in circuit designs over pure function. It is a very good design approach to consider these requirements in the very conception of a circuit, not try to add them later.