So you are paying taxes on your contributions regardless, the timing
is just different.
I am failing to see why would a person get an IRA, instead of just
putting the same amount of money into a mutual fund (like Vanguard) or
something like that.
What am I missing?
You are failing to consider the time value of money. Getting $1 now is more valuable to you than a promise to get $1 in a year, even though the nominal amount is the same. With a certain amount of principal now, you can invest it and it will (likely) grow into a bigger amount of money (principal + earnings) at a later time, and we can consider the two to have approximately equivalent value (the principal now has the same value as the principal + earnings later).
With pre-tax money in Traditional IRA, the principal + earnings are taxed once at the time of withdrawal. Assuming the same flat rate of tax at contribution and withdrawal, this is equivalent to Roth IRA, where the principal is taxed at the time of contribution, because the principal now has the same value as the principal + earnings later, so the same rate of tax on the two have the same value of tax, even though when you look at nominal amounts, it might seem you are paying a lot less tax with Roth IRA (since the earnings are never "taxed").
With actual numbers, if we take a $1000 pre-tax contribution to Traditional IRA, it grows at 5% for 10 years, and a 25% flat rate tax, we are left with $1000 * 1.05^10 * 0.75 = $1221.67. With the same $1000 pre-tax contribution (so after 25% tax it's a $750 after-tax contribution) to a Roth IRA, growing at the same 5% for 10 years, and no tax at withdrawal, we are left with $1000 * 0.75 * 1.05^10 = $1221.67. You can see they are equivalent even though the nominal amount of tax is different (the lower amount of tax paid now is equivalent to the bigger amount of tax later).
With a taxable investment which you will not buy and sell until you take it out, you contribute with after-tax money, and when you take it out, the "earnings" portion is subject to capital-gains tax. But remember that the principal + earnings later is equivalent to the principal now, which is already all taxed once, and if we tax the "earnings" portion later, that is effectively taxing a portion of the money again. Another way to look at it is the contribution is just like the Roth IRA, but the withdrawal is worse because you have to pay capital-gains tax instead of no tax. You can take the same numbers as for the Roth IRA, $1000 * 0.75 * 1.05^10 = $1221.67, but where the $1221.67 - $750 = $471.67 is "earnings" and is taxed again at, say, a 15% capital-gains rate, so you lose another $70.75 in tax and are left with $1150.92. You would need a capital-gains tax rate of 0% to match the advantage of the pre-tax Traditional IRA or Roth IRA.
After-tax money in Traditional IRA has a similar problem -- the contribution is after tax, but after it grows into principal + earnings, the "earnings" part is taxed again, except it is worse than the capital-gains case because it is taxed as regular income. Like above, you can take the same numbers as for the Roth IRA, $1000 * 0.75 * 1.05^10 = $1221.67, but where the $471.67 "earnings" is taxed again at 25%, so you lose another $117.92 in tax and are left with $1103.75. So although the nominal amount of tax paid is the same as for pre-tax money in Traditional IRA, it ends up being a lot worse.
(Everything I said above about pre-tax money in Traditional IRA, after-tax money in Traditional IRA, and Roth IRA, also applies to pre-tax money in Traditional 401(k), after-tax money in Traditional 401(k), and Roth 401(k), respectively.)
Regarding the question you raise in the title of your question, why someone would get contribute to a Traditional IRA if they already have a 401(k), the answer is, mostly, they wouldn't.
First, note that if you merely have a 401(k) account but neither you nor your employer contributes to it during the year, then that doesn't prevent you from deducting Traditional IRA contributions for that year, so basically you can contribute to one or the other; so if you only want to contribute below the IRA contribution limit, and don't need the bigger 401(k) contribution limit, and the IRA's investment options are more attractive to you than your 401(k)'s, then it might make sense for you to contribute to only Traditional IRA.
If you or your employer is already contributing to your 401(k) during the year, then you cannot deduct your Traditional IRA contributions unless your income is very low, and if your income is really that low, you are in such a low tax bracket that Roth IRA may be more advantageous for you.
If you make a Traditional IRA contribution but cannot deduct it, it is a non-deductible Traditional IRA contribution, i.e. it becomes after-tax money in a Traditional IRA, which as I showed in the section above has much worse tax situation in the long run because its earnings are pre-tax and thus taxed again. However, there is one good use for non-deductible Traditional IRA contributions, and that is as one step in a "backdoor Roth IRA contribution". Basically, there is an income limit for being able to make Roth IRA contributions, but there is no income limit for being able to make Traditional IRA contributions or for being able to convert money from Traditional IRA to Roth IRA. So what you can do is make a (non-deductible) Traditional IRA contribution, and then immediately convert it to Roth IRA, and if you did not previously have any pre-tax money in Traditional IRAs, this achieves the same as a regular Roth IRA contribution, with the same tax treatment, but you can do it at any income level.