Not saying that is right or wrong, just know that doing this multiple times at the same company is often frowned upon.
Also, don't do it without being ready to make the switch--you never know when your company will call your bluff and say "ok, enjoy your new job, your last day is today."
I'd also like to present the flip side, which is what it is like to be on the receiving end of such a request. I had an employee I managed in a past job come to me with a reasonable raise/promotion request. Myself and my boss did everything we could to give it to him as he definitely deserved it in spades. We were blocked by the finance and HR departments. They did not want to do things "out of cycle" which isn't exactly fair to the employee if they started significantly outside the beginning of that cycle.
Ultimately I lost them to a competitor, and felt absolutely awful about it (even though this was in an industry where turnover is incredibly high and 1 year stints are very common). The worst part was that it was totally out of my control and I did everything I could to make it happen and failed.
When I had a similar situation in the future with someone else I managed, I flat out told them I would do my absolute best to fight for them (and they knew I meant it), but said that if the company wouldn't give them what they deserved, I would not hold it against them in the least for switching since they need to do what's best for them regardless of the headaches it would cause the team. They ultimately left for more money and the company lost another valuable employee because they couldn't part with a couple grand per year which was a pittance compared to the value this person added.
Long story short, it sucks just as bad to be on the receiving end of this, but a lot of times the direct manager may not actually be empowered to make the budget decision necessary to offer a raise. In those cases, please do your best not to hold it against them if they can't win that fight.