They knew that they could be harnessed for keeping fires lit and even sometimes associated them with the supernatural. They just lacked the tech and industrial background to use them.
We know that carbon is essential for life and if we ever engineer useful organisms to build structures or produce macroscale goods (as opposed to pharmaceuticals or food), then clearly carbon will be one of the main limiting factors, along with energy and water. It just feels like we will one day look back at this and think “why didn’t we just try to use it instead of burying it?”