Actually, Aspirin is partially soluble in water. The reason why it is only partially soluble in water is because of its hydrophobic portion of the molecule. Also, the hydrogen on the carboxylic acid functional group can hydrogen bond with the oxygen atom of the ester carbonyl group making it even further less soluble in water.
When you treat aspirin with sodium bicarbonate, it undergoes an acid base reaction to give you a sodium carboxylate, which is an ionic species of aspirin, thus making it water soluble. Also, the intermolecular hydrogen bonding affect is now absent because the proton on the carboxylic acid is now gone.