Computers may get problems if the power suddenly is turned off.
1. If data is being written to the hard drive, a bad sector is created, resulting in data loss and need to analyze the contents of the hard drive in order to recreate as much as possible of the data.
2. The processor can only work with data in the RAM. However, this data is volatile and disappears when the computer is turned off. For persistent storage, data needs to be written to the hard drive. When programs are closed, they will typically request remaining unsaved data to be written to the hard drive. If power is turned off unexpectedly, the latest changes to your data may not be properly saved.
Most modern computers will not turn off power when the power button is pressed. Instead, they trigger a shutdown process, which will request running programs and processes to exit.
If your computer simply turns off the power immediately when you press the on/off button, then I strongly suggest you follow the instructions for Windows, to use the "shutdown" command, and turn off the power only when Windows tells you to do it.
This will cost you some 30 seconds, but you won't need to scan the disk for errors next time you start the computer, and you run less risk of damaging data and installed programs.