Computer turned off by itself.

I was gone for almost an hour, and my computer tower shut off. I turned it on, and my tabs were still up.

Should I be worried?

You have Windows? There are settings which control this. Do a search for sleep in the start search area. You see Change When the Computer Sleeps. Click on it. Then you will see:

Turn off the display
Put the computer to sleep

You can also click on Change Advanced Power Settings to
Turn off hard disk drive after

Most modern operating systems have settings to allow an idle computer to do a smart shutdown (“sleep” or “hibernate”) to save power when not being used. As you discovered, when you wake it back up, it’ll be exactly how you left it. (As long as restoration worked. Long ago, this was much more risky, and even today there are some combinations of hardware and low-level software like device drivers that make recovering from sleep mode fail sometimes.)

Nonetheless, it’s a feature, not a bug.

The question is whether the computer was really off or in sleep mode.
If Windows updates the OS, when the machine comes back the desktop is still in its original state, though the computer has rebooted.

It went into the boot screen when I turned it back on, then it showed all my tabs were still there.

What do you mean by tabs? Browser tabs? Some browsers will restore tabs and other state even after a cold system reboot. Which browser are you using?

Google Chrome.

I’m assuming this is Windows 10, which, by default, will put your machine into something between sleep (basically a low power mode) and hibernate (saves state to hard drive and powers down entirely).

It’s something akin to pressing pause on a DVD.

Check your power settings. I imagine it’s set to enter some type of sleep mode after X minutes of inactivity, where X is less than 60.

Now my computer went to sleep while I was unloading the dishwasher. I was gone maybe 5 minutes.

Boot screen? If you mean the intro page from the computer maker, that is standard when coming out of sleep.
Did you have anything else open, besides the browser? Did that come back too?
My Windows (10) goes to sleep a lot faster than my settings tell it to - except when it has been a while between reboots when it stays awake.

May also be a components, power supply, motherboard, RAM, hard drive, anything. Not enough to cause a full shutdown, but glitching enough to cause an issue. Hard to troubleshoot since you have to swap out components. But, something you can easily do is turn off the computer, assuming it’s not a laptop or a Mac which may not have user access, and plug and unplug everything you can, hard drive cables, RAM, power supply cables, add in cards, etc.

BTW, by “The tower shut off”, I mean the light on the tower was off. The light on the monitor was still on.

The reason I’m worried is because that’s NEVER happened to me before.

I turned my computer on today, and it turned off. I turned it on again, and the light went on, then off again.

The next time, it stayed on.

One guess is a failing cooling fan on the CPU–the fan locks, CPU overheats, the computer shuts down in self-defense.

A)Check your power settings. People are suggesting it’s going to sleep. If that’s the case, something may have happened in the power settings menu. Go there and make sure there’s nothing about it turning off/sleeping/stand by/hibernation etc. You can change the back later if you’d like, but to rule that out, turn them off.

B)It’s been a long time since I’ve seen this happen, but back in the day, computers would randomly shut down if they were over heating. Open the case and see how dusty it is in there and make sure all the fans are running. Replace any fans that aren’t working and if necessary clean out the heatsinks, particularly the one on the processor.

I’m talking about when I first turned it on this morning. It turned off.

If chrome was shut down unexpectedly (say, a power outage), when you restart it you’d get a banner that reads, “Google Chrome did not shut down correctly” and offer to restore all you open pages/tabs. If you didn’t see that and your tabs came back, the machine probably hibernated in an orderly way. Now why it did that when you say it hasn’t done it before… no idea.

Went through Event Viewer:

Back up all your data ASAP (as in, yesterday), if you haven’t already, and prepare to spend some money. Odds are very good that you’ve got a major component failure.

Nah, no huge panic about backing up data (unless it is a flash drive.)