Why did my project suddenly stop working?

The last time I checked it (before leaving work), I had my code working as intended. After closing the project (and not introducing any changes overnight), I opened it the next morning only to discover that it’s not working as intended anymore. It still compiles, but the behavior is different.

My question is how could this happen? Could it be because the project was rebuilt when I reopened it, causing some of the (previously undetected) bugs appear?