Understand is certainly used as a stative verb, but it is also used in certain senses as a transformational verb. Contrast the following two senses defined by Collins:
(may take a clause as object) to know and comprehend the nature or meaning of I understand you I understand what you mean
(may take a clause as object) to realize or grasp (something) he understands your position
The second definition (if not the example given) indicates a realising, a grasping hold of. 'Have a hard time (with) understanding X' means 'have difficulties mastering the concept'; the struggle may take quite a time, but the eureka moment be - well, momentary. Here, a growing understanding makes classification into process or sudden transformation difficult.
Some verbs may take a preposition as well as an equivalent prepositionless completer:
They fought with / against the Germans. ('with' ambiguous!)
They fought the Germans.
Perhaps here, a better analysis is to realise that 'understanding' retains both verbal and nounal properties, encouraging the omission of and the retention of 'with' respectively.