Swelling can be the result of thermal or mechanical damage without current being passed.
Could be a manufacturing defect in the battery, abuse during construction of the phone (perhaps as simple as poor dimensional tolerances), or storage at excessive temperatures.
Either way, best not to trust a swollen battery.