Not knowing anything about it I would hypothesize Melville’s literary development went something along these lines:
— Melville wanted to be Shakespeare — wanted to be everything. Scientist, philosopher, adventurer, poet.
— He realized with Moby Dick this was an absurd thing to undertake, that he had been joking all along. His philosophizing wasn’t philosophy, his cetology wasn’t science.
— He says, now let’s get serious, what can I say that isn’t an absurd joke, what real truth is accessible to the novelist? And his style becomes more spare.