I’m afraid this answer isn’t 100% correct. There are ways to find out a file’s type beyond looking at an extension. For example, there are lots of file formats where all of the files start with a specific sequence of bites, known as a file signature (or as “magic bytes” or “magic numbers”).
You can try the file
command line tool to check that you can find out a file’s format without resorting to its extension, and you can read the tool’s manpage to learn how it works.
Ubuntu isn’t terrible, there are just bad things on Ubuntu that aren’t present in other distros.