I think you will agree that swelling can cause pain and loss of function.
Swelling is a natural response to injury and is one of the body’s ways of signalling adjacent cells that they need to start the healing process. Sometimes, this is too great and needs to be managed so that other areas (e.g. motion and function) can be achieved.