What makes a tar archive seekable?

The file header for each file includes its size in the archive. This allows the file content to be skipped if not needed. Tar just seeks to the next header that follows the file content. There is documentation on the header format.

Compressed tar files are just that. You can freely switch been an uncompressed and compressed tar file format by using the appropriate uncompression program (often gunzip) or compression program (gzip). With some tar programs this is the only option. The tar file itself remains seekable even if it is compressed.

What is not seekable is the compressed format. Compression works by finding a relatively small number of bytes to represent the data being compressed. Blocks of data with relatively few byte values or repeated byte strings compress well. Block of data with lots of different byte values and few repeated byte stings do not compress well if at all. For some data, compression can actually increase the size of the file. The compression ratio for blocks within the file varies. The variance can be extreme for a tar file which may consist of very compressible files, and relatively non-compressible files.

There is no mechanism within the compressed data to seek to some position in the uncompressed data. While some compression programs allow seeking to an individual file with a compressed archive, the only file the compressed archive would have access to is the tar file. Tar files are rarely compressed with such tools, although compressed or uncompressed tar files may be included when archiving sets of files.