In our book we use for our classes, we often require cardinals to be uncountable regular cardinals (when proving stuff with cofinality/stationarity...). We often use that by creating some sort of sequence of length $\omega$ inside of an uncountable regular cardinal $\kappa$ and then saying that that sequence can't be cofinal so the union of all elements is still strictly smaller than $\kappa$.
This left me wondering if $\text{cof}(\kappa)>\aleph_0$ implies that $\kappa$ is regular. I tried to find counterexamples and found this: I tried to find something of the form $\aleph_{\aleph_\gamma}$ for some cardinal $\aleph_\gamma$ with uncountable cofinality. For example $\aleph_{\aleph_1}$ and you get $\text{cof}(\aleph_{\aleph_1})=\text{cof}(\aleph_1)=\aleph_1$. So I think this is a valid counterexample.
My question now is why one would assume $\kappa$ to be regular (and uncountable) if one can just loosen the requirement to $\text{cof}(\kappa)>\aleph_0$.
We use the book of Peter Koepke on set theory which can (for example) be found here.
Modulo notation (which is important), your counterexample is correct. Remember that in the expression "$\aleph_\alpha$," the subscript $\alpha$ needs to be an ordinal - so you should write "$\aleph_{\omega_1}$" instead of "$\aleph_{\aleph_1}$." To see why this matters, consider how you would refer to the successor of this cardinal: "$\aleph_{\omega_1+1}$" makes sense but "$\aleph_{\aleph_1+1}$" doesn't since $\aleph_1+1=\aleph_1$.
That said, there are plenty of theorems which hold for uncountable regular cardinals but not uncountable-cofinality cardinals. So whether or not you can get away with a weaker hypothesis depends on the details of what you're doing.