Good point. Another point is that that verse is poorly translated. It shows translator bias. It doesn't actually say "elect according to the foreknowledge of God. The word translated elect, eklectos, is actually in verse 1. Here is Young's literal translation.
Peter, an apostle of Jesus Christ, to the choice sojourners of the dispersion of Pontus, Galatia, Cappadocia, Asia, and Bithynia,
2 according to a foreknowledge of God the Father, in sanctification of the Spirit, to obedience and sprinkling of the blood of Jesus Christ: Grace to you and peace be multiplied! (1 Pet. 1:1-2 YLT)
The word "choice" in Young's translation is the Greek word "eklectos" which is usually translated elect. The KJV and many other translations have move it from the verse 1 to verse 2.
Πέτρος ἀπόστολος Ἰησοῦ Χριστοῦ ἐκλεκτοῖς παρεπιδήμοις διασπορᾶς Πόντου, Γαλατίας, Καππαδοκίας, Ἀσίας καὶ Βιθυνίας (1 Pet. 1:1 BGT)
I've bolded the word choice or elect in the verse above. As you can see in the Greek text it's in verse one.
What is according to God's foreknowledge, or before knowing is, "grace to you and peace be multiplied".
2 according to a foreknowledge of God the Father, in sanctification of the Spirit, to obedience and sprinkling of the blood of Jesus Christ: Grace to you and peace be multiplied! (1 Pet. 1:2 YLT)
In modern English we would put "Grace to you and peace be multiplied" at the beginning, in front of the clause "according to the foreknowledge of God." It would read,
Grace to you and peace be multiplied, according to the foreknowledge of God the Father, in Sanctification of the Spirit, to the obedience and sprinkling of the blood of Jesus Christ.
Again, 1 Peter is addressed to the Jewish believers who are scattered in the cities Peter listed.
Peter, an apostle of Jesus Christ, to the choice sojourners of the dispersion of Pontus, Galatia, Cappadocia, Asia, and Bithynia, (1 Pet. 1:1 YLT)
The Greek word translated dispersion is "diaspora" it's a term that was used of the Jews who were scattered among the nations.