Herman Melville and Franz Kafka

Though now recognized as great writers, Herman Melville and Franz Kafka were not popular in their day. Why do you think this is true?