Some very common reasons that I write code:
👨🎓 To learn a new pattern, tool or technique
👩🔬 To experiment with a new idea
🤔 To check if something is even possible
🏃♂️ To test my own skills & limits
😊 For fun
Not all the code we write has to be for production 👍