Public Key encryption /Assymetric encryption
The part you're missing here is that Public Key encryption is asymmetric - that is, data can only be encrypted with the public key, and can only be decrypted with the private key. Public key encryption systems are created in such a way that the encryption is (mostly) irreversible, but there is a mathematical 'trapdoor' that allows the private key to be used decrypt the data.

Compare this with a symmetric encryption scheme, where there is only one secret key (so both Alice and Bob would have to share the key to use such a scheme).

i.e. once the data is encrypted by Bob using Alice's public key, noone holding Alice's public key can decrypt it. Only Alice, using the private key and the different decryption algorithm can decrypt it.

The answers to How does asymmetric encryption work? give more detail as to how this works.