The reasons can be very different: SMC MacBook problems, lack of system memory, program errors, overloaded processor due to resource-intensive software usage, etc.