The German state participates on a multilateral agreement with more than 90 states worldwide to exchange financial account information. This information will include your personal details as well as deposits on your bank accounts and investment income. With this information the German state has the possibility to check, if you declared your investment income in total in your residence state. Do you have a bank account in a country outside of your residence state? Then you could be listed on this exchange list, if these states are part of this agreement. You can find a list of the participating states here.