Sometimes, improperly logging out of QuickBooks will result in data corruption. Though, there are a lot of possible causes such as network glitches, computer viruses, power blips, etc. It's still best to log out via normal process and back up your data regularly to avoid data damage.
both the close company command and the close program command call some housekeeping routines designed to close the data base files correctly. Usually the close program command calls those routines and waits for them to complete before shutting down the program.
Usually is the key word. So it is safer to close the company file and then close the program