What is the difference between .class and .dex files?
There's a Dex File Format and the Class File Format specification from the respective company.
These 2 files are completely different.
Whereas a Java jar file has many class files, each APK file has only a single classes.dex file, as shown below. According to Google, the APK format differs from the class-file format for performance and security reasons.