Rye flour contains high levels of pentosans, which prevent gluten from forming in dough. When gluten isn't formed, the dough cannot trap gasses needed for good fermentation. The lack of fermentation creates a dense dough and a dense loaf.