Inhaling hazardous chemicals can lead to pulmonary fibrosis. It can also stem from certain diseases, medications, or genetic factors. Smoking increases the risk of developing pulmonary fibrosis.