That is a sort of cute and innocent misunderstanding on your part. I remember when I stumbled at that same thing.
It is also a pivotal point which if you will receive with meekness will begin to open up your understanding and help you to see yet even more.
Everything back there were shadows. Paul has told you that, especially in Hebrews. The gates to Jerusalem were closed and locked on the Sabbath day back there in that fleshly Jerusalem. That compares to unbelief as that locking of the gates was done as a man-made tradition of those religious leaders who did not believe in God's warning to them. Thus they locked the gates to force obedience to them.
With those locked gates on the Sabbath, locked by the religious leaders fleshly traditions, escape to safety from out of that whoreish city would be impossible for anyone on the Sabbath day should that be the day their need for flight to safety and refuge elsewhere came.
The need did come on that day and the people could not escape due to the traditions of their religious teachers holding them captive, as those locked gates. So as i said, they were held captive to unbelief. Trusting in those wolves in sheep's clothing posing as their spiritual leaders, they were lulled into a sense of false security.
Now, Paul shows how that fateful day compares to that day in the wilderness, that day where God gave them rest from their work of slavery (that yolk of bondage) in Egypt.
Extra Extra!!! Read all about it. You need not be told where.