Ancient people probably discovered tar through repeated contact with natural bitumen, resinous wood, fire, smoke, and the sticky residues left by heated organic materials.
No one can reconstruct the first discovery of tar with certainty. It probably happened more than once. People living near natural bitumen seeps could find sticky black material without making it. People using fire around bark, resin, roots, and wood could notice that certain materials produced useful dark residues when heated.
Discovery does not mean instant mastery. A sticky residue in a fire is one thing. Deliberately making birch tar or wood tar is another. That requires controlling heat, limiting oxygen, choosing the right material, and collecting the product before it burns away or disappears as smoke.
Ancient material knowledge often grew from practical need. If a substance could glue a tool, seal a basket, waterproof a seam, darken wood, or protect fibre, people had reasons to remember and refine the process. Trial, error, and tradition could turn accident into craft.
The safest answer is that tar was discovered through close observation of fire and natural sticky materials. Its later history shows how powerful small discoveries become when they solve everyday problems.