There is a lot of information on the net and I cannot and do not want to be exhaustive. However, this page is intended as a basic explanation.
Bloating of batteries
Batteries can become a bit bulky and even some new batteries are not completely flat while they still perform well. In principle, swelling is not intended. However, expansion and contraction is part of charging and discharging LiFePO4 cells. There is also gas formation, which is why there is a valve, usually between the electrodes. Search for “LiFePO4 swelling” to get an impression. This is a document explaining it a bit more.
The most important thing is to treat the batteries properly. Do not overcharge, keep the voltages within limits and limit the charge and discharge current. This way you will have the longest enjoyment of the battery.