Typically that's solved with R&D happening in academia or semi-public space.
How much this happens depends on the opportunities to do it in private companies, so entities like Google paying big salaries for R&D probably means we don't see what alternatives they would be if they stopped doing so.