When More is Less: Understanding Chain-of-Thought Length in LLMs