Both tape and goop seal the threads from leaking. Threads are designed to not have interference between the major diameter of the male thread and the root radius of the female thread. Likewise the minor diameter of the female thread and the root of the male thread. With tapered pipe threads the interference occurs at the pitch diameter so you still have a clearance at the thread roots. A sealant or tape fills that tiny gap preventing seepage.