In Peter's first major reference to the cross in this letter (1.18-19), he demonstrates how it is to be the supreme incentive to holy living. He points to the greatness and the costliness of the cross, and shows how, in the light of this, Christians are to be a godly people.
Chapter 2 verses 18-25 is part of a wider section on how Christians are to respond to worldly authorities. This was obviously a very real dilemma for the early believers, as almost all of those in authority over them were still completely pagan. How were they to behave in godly ways in an environment that was inevitably so ungodly?
In response Peter addresses three areas of life - the three areas which he knows would be most relevant to his readers. He speaks of the state, the workplace and marriage. In each case the overall message is simple; they are to continue to submit. Authority is God-given, and whether the authorities themselves behave in a godly way or not is irrelevant. They are to be respected because their function is basic to God's ordering of his world.