It’s a great questionand one worth asking Protestants if you ever get into a discussion on Scripture. Basically Luther looked at the deuterocanonical books and saw that they proclaimed certain doctrine and practices he didn’t agree with (such as purgatory and praying to the dead). Therefore, he decided they must not belong in the Bible because he thought such teachings are irreconcilable with “authentic Scripture.”
But as one article puts it, “This objection [that is, Luther’s claim mentioned above], of course, begs the question. If the deuterocanon is inspired Scripture, then those doctrines and practices are not opposed to Scripture but part of Scripture.”
Basically, Luther removed what he did not agree with and even went so far as to add to Scripture. Which calls to mind the words of St. John in Revelation 22:18-19.
What authority did Luther have to do such a thing? Absolutely none. You are correct in being confused, I would be more concerned if Luther’s reasoning made sense to you!