Following your example, the act of transferring bitcoins from wallet1 to wallet2 is made public, as part of the blockchain.
Put simply: when sending bitcoins, you must send from the address that received them. You cannot, for example, receive bitcoins on one address, create a new address, and then send those same coins from that new address. You have to essentially "pay" that new address from the first address, and that action is public and traceable.
Put simply: when sending bitcoins, you must send from the address that received them. You cannot, for example, receive bitcoins on one address, create a new address, and then send those same coins from that new address. You have to essentially "pay" that new address from the first address, and that action is public and traceable.