Why is there a controversy over who wrote Deuteronomy?

Moses with the tablets of the Ten Commandments...
Moses with the tablets of the Ten Commandments, painting by Rembrandt (1659) (Photo credit: Wikipedia)
By its own testimony (Deut. 1:1, 5; 31:22), Deuteronomy is the work of Moses. Mosaic authorship is affirmed many times elsewhere in the Old Testament (e.g. 2 Kin. 14:6), in ancient Jewish sources (e.g., Josephus), and in the New Testament. This view was almost universally held until the rise of rationalistic criticism in modern times.