A Sydney woman who allegedly had $4.6 million mistakenly given to her by her bank and spent much of it on handbags may not have broken the law, a magistrate has told a court.

Christine Jiaxin Lee, 21, was arrested while trying to board a flight to Malaysia on Wednesday night, four years after the extraordinary "glitch" in Westpac's system.

The chemical engineering student has been charged with dishonestly obtaining financial advantage by deception, and knowingly dealing with the proceeds of crime.

However, magistrate Lisa Stapleton granted Ms Lee bail on Thursday, saying it appeared Westpac inadvertently gave her an unlimited overdraw facility and so she used it.