The overarching reason why the Nazis targeted Jehovah's Witnesses was because the Nazi's were trying to mobilize the German nation under a totalitarian one-party state, but the Witnesses refused to be a part of this movement.
Witnesses then as now refused to participate in anything which they saw as political. They do not vote, run for office, or go to war. It is not that they are pacifists. They do not go to war because they see wars as political activities. They see participation in politics as an act of disloyalty to God whom they expect to shortly replace all human governments.
However, they believe that until that happens God expects them to be good citizens in all other respects and to obey human rulers as long as they do not require that which God forbids for forbid that which he requires.
This brought them into direct conflict with the Nazi state. The state demanded that citizens glorify it and support its policies by word and deed. This was a beyond a bright line which the Witnesses would not cross. They would not shout "Heil Hitler!" in greeting. They would not join Nazi organizations. They would not do work that supported the war effort. They would not join the army. They would not sign a document renouncing their faith. And, they would not stop spreading their faith.
They also distributed publications critical of the Nazi movement and Hitler both inside and outside of Germany. This included descriptions of concentration camps and the program to exterminate the Jews well before these things were well-known outside of Germany.
Most of those who were caught and confined in the concentration camps continued their resistance there. Attempts to break them and make them
participate in the war effort were largely unsuccessful. This was
because their belief system imbued their suffering with profound meaning. If they died, then their death was a heroic death in a noble cause.
Since the Witnesses considered themselves law-abiding citizens they would accept work which they considered neutral and frequently did hard labor on various construction projects.
The Nazi officials knew that the Witnesses, as prisoners of conscience, could be relied on to follow their declared principles in all cases. A few were set to work as barbers and shaved officers with straight razors. Occasionally officers would bring Witnesses women home to assist their wives with child care. The Witnesses saw the faithful fulfillment of such duties as a way to delineate their position and expose the hypocrisy of a State which cast law-abiding citizens as enemies.
The struggle between the Witnesses and the Nazi state was a war of two completely incompatible ideologies. One demanded absolute obedience to the State in all things. The other demanded absolute obedience to God. Serious conflict was inevitable.