In 1908, Thomas Sullivan, a New York City tea importer, sent samples of his tea in silk bags. Instead of using a tea strainer, customers simply dunked the whole bags in hot water.
When Sullivan heard about this, he switched from silk bags to ones made of gauze with a looser weave, allowing the water to circulate through the leaves better.
On August 26, 1901, Roberta C. Lawson and Mary McLaren jointly filed a patent for a "Tea Leaf Holder" that closely resembles the modern tea bag, which was granted in 1903.
Unlike Sullivan, Lawson and McLaren made the tea bags purposefully, as they wanted to create a device that would allow people to brew a single cup of tea at a time.
Although the two women secured a patent in 1903, they never managed to market their tea bags on a large scale, so Sullivan's customers likely didn't know of the original tea bags.