God taught this. In the words of Jesus himself
john 1: 12. but as many as have received him, to them he gave the right to become children, even to them who believe
john 3, for god so loved the world he gave his only son that whoever believes in him will never perish, but has eternal life...