Offshore bank accounts are legal. It is perfectly legal to make banking transactions on offshore personal bank accounts. But they must meet the requirements of the tax authorities of your country of residence, which in many countries require this type of account to be declared.
Many international measures, TIEA, AEOI, FACTA, have been put in place to ensure that personal bank accounts or bank accounts of offshore companies opened abroad are reported to the tax authorities of the country in which the account holder resides.
The Foreign Account Tax Compliance Act (FATCA). It concerns exclusively the United States. It stipulates that US citizens with accounts abroad are required to declare them to the US tax authorities. Banking institutions in FACTA signatory countries (113 countries or 77,000 banks) are required to report to the IRS the assets of citizens abroad).
The Automatic exchange of Information is an OECD measure and concerns its member states (except the United States), as well as the so-called partner countries. The AEOI requires each signatory country to report bank accounts opened by foreigners on their territory. This exchange of information between all signatory countries is automatic and systematic. With the adoption of the AEOI and the TIEA (Tax Information Exchange Agreement) of the OECD, you are now required to declare the existence of your offshore bank accounts in your country of residence.
Most of the well-known offshore jurisdictions such as the Bahamas, British Virgin Islands, Seychelles, Cayman Islands, Belize, Panama, Hong Kong, Singapore... are now subject to AEOI. De facto, most banks have raised their compliance standards: offshore bank accounts have become increasingly difficult to open in these jurisdictions, which require more and more documents from foreigners to comply with AEOI and FACTA rules.