Why are preinstalled apps so small?
Because Android 7 only shows space occupied from /data.

This is my phone [OnePlus 5]. Using the same app AOSP Keyboard as example.

In settings it shows as 260KB, and

# du -sh /data/data/com.android.inputmethod.latin
24K     com.android.inputmethod.latin
# du -sh /system/app/LatinIME
19M     LatinIME


Personal guess: A normal user can't alter how much space an app takes in /system, so Android chooses to directly ignore it.