God knows his next plague is going to work, so he prepares the people of Israel for what he is about to do. It is a combination of God caring for Israel while showing his wrath against those who continue to reject him.
The summary at the end of the chapter is also a summary of how God has always dealt with humanity. God tells humanity his desires for them, and they don鈥檛 listen. God responds with demonstrations of power designed to convince people to follow him, but many continue to disobey. We should be thankful for his patience.