The word "de" in French is used for many different things that have nothing in common most of the time -- you should not try to look for a common sense between these usages. In particular it "de" can be used to introduce a description.
Here your problem seems to be the difference between these two sentences for example:
Il est bon d'être chez soi. (It is good being at home)
Être chez soi est bon. (Being at home is good)
In one case you have "de" ("d'" here) and in another you have nothing. In the first sentence "bon" is a vague notion that is detailed by a description: "d'être chez soi", whereas in the second we use "Être chez soi" as the subject so "bon" doesn't need more details.
In your example, "difficile" is detailed by a long description: "de comprendre (...)", it is the same mechanics. It works even when you infinitive is used for describing something that is not an adjective:
J'enrage de m'être trompé -> I am angry I made a mistake
Some differents examples that work the same way (translations are done fast, I don't guarantee they are good):
Tu essaies d'être à l'heure -> You try to be on time
Nous sommes remplis de l'espoir de gagner -> We are filled with the hope to win
Vous êtes déçus d'avoir perdu -> You are disappointed to have lost