Rib fractures are very painful. Any movement of the chest increases the pain. Your chest muscles instinctively contract to keep the rib still, making it difficult to breathe.
When you breathe in and out, your rib cage expands and contracts in order to accommodate the change in volume of your lungs. This motion causes pain when a rib is fractured.