For being able to find a maximum of a list, the whole list needs to be evaluated.
So it will calculate collatzLength from 1 to 1000000 and collatzLength is recursive. The worst thing is, that your definition of collatzLength is even not tail-recursive.