IMO the explanation could be the following:
CREDIT FOR is correct when "credit" is not the verb, as in He got
credit for my hard work or She received
credit for her years of service.
Credited for : when credit is not a verb but a noun.
For example: she received credit for her good work.
In the question, credited is used as a verb so we can't use 'credit for' here.
Credited to is used when Credit is used as a verb: 'Credit X to Y'. Eg: The bank credited $1 billion to your account.
Credited with is used when Credit is used as verb: 'Credited Someone with something'. Eg: Your account has been credited with $1 billion.
In the above question, credit(ed) is used as a verb, the idiom in English is to credit something with having had some effect. Thus only choice A is idiomatic. Both/or (in B and D) and to (in C) can be used idiomatically when credit is a noun, as in "Thurgood Marshall gave
credit to US art for having had a strong influence on his work." The verb form
having had is used appropriately in choice A to indicate action that occurred prior to action expressed in the simple past tense--that is, to indicate that US art had influenced Thurgood Marshall before he credited it with having done so.
Hence, the answer would be A.