How to fetch the resistor values of AD8403 (digPot) programmatically?
The SDO pin on these devices is only for daisy-chaining, they are write-only. 

Reading back the SDO pin concurrently via SPI is the best you can do with this IC, and it will tell you that at least the data input part is working. But you can't read back what is actually in the individual registers. Knowing that the data gets shifted through gives you a lot of confidence that the IC is working, just not 100%.

There may be other types of digi-pot that can read back the resistor registers over SPI. However, reading back the pot registers still won't give you 100% confidence that the IC is presenting the right resistance at its terminals.

Bear in mind what sort of failures tend to happen to ICs, it's very unusual for an internal fault to develop, it's much more likely to be voltage stress on the pins killing the I/O. If your digi-pot IC had passed its functional test (and even reading back the resistor data registers themselves is inadequate for this, the functional test would have to make sure the resistors were working), then reading the pass-through data from the input logic verifies that the chip has power, its input register is behaving, and therefore that it's overwhelmingly likely that the rest of it is working.

Reading individual registers is important for debugging the controller software, and checking the synchronisation of data between the controller and its peripherals. One might argue that once the software is working, this test becomes less relevant. However, it makes possible automatic regression testing of the software, which is more or less important depending on your industry, aerospace or media players respectively.