The corks in wine bottles come from vast cork forests, carefully managed over decades in order to harvest the bark of cork oaks. It's an excellent example of a renewable resource, in which the trees provide an economic incentive to keep them healthy. But in addition to the cork itself, these managed forests provide habitat for birds—without the cork industry, we might lose a bunch of bird species. Here's a video from Bill Hammack, The Engineer Guy, explaining how the cork harvest works:

Note that in addition to plastic stoppers, screw-tops are a major trend in the wine bottling industry. We covered this topic 10 years ago, and some of the dire predictions from then about threats to cork forests have thankfully not come to pass. Part of that may be due to the rise of cork as a flooring material, and its use in shoes—it's not just about wine corks.