I've even seen this internally. If I want to go to another team, why would my manager use their budget or political influence to promote me when they can use it on someone who is staying on their team.
In a perfect world, your manager should not care and your company should not treat you any differently for looking, but this is rarely the case.
At my company, internal postings notify your manager when you apply, so there's no avoiding it. It's generally better to talk to them first so they aren't blindsided by the posting. Otherwise, if you don't get the new position that could create some friction with the existing one. My company can also trap you in your current position if they designate you as a "key resource".