.dmg files are like .isos.
If you open them, you can install the respective programs held inside. I don't know why they randomly appeared, but I would think that an iOS app wanted you to run them on your Mac. If you don't intend to install GIMP or the other program, just delete them.
It's possible that they could be trojan horses, but I doubt it. Just delete them if you know that you don't need them, no worries.