This is called Inbound Marketing, which consists of creating actual useful content slightly tangential to your own product/service so to attract audience which will, potentially, convert to customers.
Sometimes it’s well executed (see Realm’s) sometimes it’s not.