A little stupid. Only Program NCA is installed to either SD Card or NAND. Other files like Control NCA and Legal Informations are always installed to NAND, so if you will install the same file twice, then:
a) homebrew will cancel installation and it will show that this file is already installed
b) it will overwrite data on NAND, which is exactly the same as reinstalling, but Program NCA may be not deleted (small chance, that's why a) is more often to show with newest homebrews)