I have also seen this happen on my system a few times. For me, it happens right when a Time Machine backup finishes (I am also backing up to an external USB HD). I am running macOS Mojave 10.14.3 (18D42).
It is very likely that Time Machine creates this file so that it can recover the OS in the case that the backup fails and screws up your system. It probably self-deletes this file if there are no issues at the conclusion of the backup.
In case Time Machine is not the only culprit, I recommend searching your system for the source(s) of the file. Open the application "Terminal", and run the following command:
sudo find / -name BaseSystem.dmg -type f 2>/dev/null
This will prompt you for your admin password because it will search all files on your system (even those owned by the root user). Depending on how big your hard drive is, this could take a very long time.
For me, the only file found was at
/Library/Application Support/com.bombich.ccc/Recovery/BaseSystem.dmg. This is a directory used by Bombich Software's Carbon Copy Cloner application. I know this application archives the recovery partition for your OS (so you can reinstall macOS if needed), so I am assuming this DMG file is related to that.
I haven't tried it, but I assume that if I were to delete this CCC file, it would just get recreated by CCC later. As others have stated, this file does not seem to be malicious or harmful in any way, so keeping it around or deleting it probably doesn't matter too much and is really up to you.
If you really want to, you can delete all of these files with the following command:
sudo find / -name BaseSystem.dmg -type f -delete -print