The short answer is that those seven books contained theological ideas that were counter to Luther’s ideas, prayer to the dead, etc.
A longer answer deals with the fact that some Jewish canons did not include those books as inspired while some did. The thinking in the Protestant circles was that if they Jews rejected these books, we should too. Logically then those folks should also reject the entire NT.
On a more practical note, we need to consider the fact that the seven deuterocanonical books were in place from the establishment of the canon until the Protestant revolution/reformation. So for about 1,100 years these books were not questioned. If they were truly in error, that would mean that God let his sheep go astray for 1,100 years by allowing them to receive the false Word mix in with the authentic Word.
Luther also removed the book of James and Revelation. He later added them back in, called James, ‘
an epistle of straw’. If Luther had his way, the current Protestant bible would be even smaller.
Hope this helps!