You just "take ownership" of such folders and delete them afterwards.
By default, Windows Installers will not remove non-empty folders, and it has no knowledge on folders that didn't be created by it, so you need to do that manually.
If your MSI file is created with WiX Toolset, you can add RemoveFile / RemoveFolder / RemoveFolderEx element to tell Windows Installer to remove those files on uninstall.
For other MSI file creation products, you'll need to read their manual to see if they offer similar options.