The GNU tar command included with Linux distributions has integrated compression. It can create a .tar archive and then compress it with gzip or bzip2 compression in a single command. That’s why the resulting file is a .tar.gz file or .tar.bz2 file.
https://www.howtogeek.com/248780/how-to-compress-and-extract-files-using-the-tar-command-on-linux/