There are multiple reasons. Beyond being a vehicle for imparting knowledge, they are a powerful way to showcase your subject matter expertise and build your brand. In most cases they are going to enable you do this in a much more scalable way than traditional speaking or classroom based teaching, and depending on your approach, they can create an automated, perpetual revenue stream for your expertise-based business. If you offer other knowledge-based services - for example, consulting or coaching - online courses can be a great to diversify your portfolio and reduce the risk of depending too much on one source of revenue.