This. Can't stress points 2 and 3 enough. Remember Segment [1], one of YC's most successful companies, started out as a small open source tool on Github. But even though it was small and had basically no features, the enterprise loved it and asked for more. That's how they realized that they hit a nerve.
So writing and releasing OSS may not lead to direct monetization opportunities, but it can be a great way to get in touch with enterprises and to get demand readings quickly.