It's perfectly fine to shop around for other opportunities while you're working for a company - In fact you should always do it - There is nothing deceptive about that. You're selling your time, your employer doesn't own you.
If you are on an H1B and your employer fires you, you immediately lose your right to live in this country, and to seek work, and must leave in the shortest amount of time you can.
So if your employer doesn't like you shopping around they can stop you.
>> you have to deceive your employer until the transfer goes through
It sounded like it is morally bad to do so. @jondubois says that there is nothing wrong in it as you do not belong to your employer.