it had more to do with who was carrying out the occupation
america didn't have deep resentment or hatred for japan. pearl harbor was seen as a dishonorable sucker punch move but beyond that there was little ill will.
west germany on the other hand was occupied, among others, by the french, and those were driven by bitter seething hatred for their neighbors that went back a very long time
>recently embarassed due to being rolled over within weeks by the wehrmacht and having to be bailed out by the burger army (americans still throw surrender jokes at them for that to this day)
>still reeling from the pyrrhic victory that was ww1 (a war the french deliberately chose to enter)
>still mad at getting blasted by bismarck in the war of 1870 (a war the french started for what essentially boils down to pride and ego)
>still mad at the german states turning on napoleon when russia broke his army instead of willingly remaining french vassals forever
this is why the occupation of west germany was much more punitive and malicious in nature than that of japan. americas goal with japan was mainly to ensure that japan would not turn against america again in the future, and making use of it as a strategic ally against communism in asia. in europe on the other hand the french wanted to thoroughly destroy the german nation, and what little of it remains today is mostly thanks to the americans putting a bit of a lid on the french and their vindictiveness, because the americans were more interested in securing west germany as a strategic asset against the eastern bloc rather than to inflict maximum damage and suffering.