The example you gave, Shostakovich's Gadfly suite, gives you quite a lot of the answer: music is often written for several instruments at once, only one of which is a violin. The Bb clarinet is no doubt thinking "whew, this score's key signature no longer looks so crazy".
Maybe Shostakovich associated his initial idea for that Romance so strongly with D flat major that he did not care how good that prominent violin sounds in that key, or maybe he only came up with the prominent violin part later in the compositional process.
Another reason that violin music is written in D flat major and other keys with no prominent open strings may be precisely because it's harder to make those keys sound good. There must be a reason why a recording of that Romance ended up on an album named "Virtuoso Violin".
And if you really want open strings in D flat major, there may be a scordatura tuning that allows for this. (Saint-Saens's "Danse Macabre" famously uses scordatura tuning so its violins can play those Eb-A parts easier.)
Oddly, I just Googled score images for the Romance from the Gadfly suite, and none of them are in D flat major. (They're most commonly in C major or D major.) Granted, Shostakovich's works not being in the public domain makes his original scores tough to verify without listening to them, and I have reason to believe that all of those scores are of arrangements.