Ok, why did his disciples not subject themselves to "authority" when they were told not to preach?
They did subject themselves to that authority as well as God’s authority. They obeyed God and were delighted they were worthy to suffer for Christ.
You are creating a dilemma that does not exist.
I know you didn’t address others but in answer to your question, it was God’s will in both circumstances. Jesus was to die as a propitiation for His people at the hands of the Roman’s and for the apostles and disciples to preach His Word even unto their deaths. We are never to go against God’s known will to fulfill man’s will or laws.