The world (Jn3:16) does not refer to everyone.
The apostles's vision (Rev7:9) shows that the whole of humanity is represented in glory:'every nation, tribe, people and language'.
God,The Father, sovereignly chose His representative sample of humanity:'before the creation of the world'(Eph...