Acts 8:1-24
On that day a great persecution broke out against the church in Jerusalem, and all except the apostles were scattered throughout Judea and Samaria. Godly men buried Stephen and mourned deeply for him. But Saul began to destroy the church. Going from house to house, he dragged off both men and women and put them in prison.
Those who had been scattered preached the word wherever they went. Philip went down to a city in Samaria and proclaimed the Messiah there. When the crowds heard Philip and saw the signs he performed, they all paid close attention to what he said. For with shrieks, impure spirits came out of many, and many who were paralyzed or lame were healed. So there was great joy in that city.
Simon himself believed and was baptized. And he followed Philip everywhere, astonished by the great signs and miracles he saw.
When the apostles in Jerusalem heard that Samaria had accepted the word of God, they sent Peter and John to Samaria.
Then Peter and John placed their hands on them, and they received the Holy Spirit. When Simon saw that the Spirit was given at the laying on of the apostles’ hands, he offered them money and said, “Give me also this ability so that everyone on whom I lay my hands may receive the Holy Spirit.”
Peter answered: “ ... Repent of this wickedness and pray to the Lord in the hope that he may forgive you for having such a thought in your heart. For I see that you are full of bitterness and captive to sin.” Then Simon answered, “Pray to the Lord for me so that nothing you have said may happen to me.”
Why?
Saul joined the Jews, and the priests and persecuted the church in Jerusalem.
Philip performed the miracle to preach the gospel in Samaria and many people followed him. And Philp healed many paralyzed or lame persons.
Simon believed in and was baptized but did not accept the baptism of the Holy Spirit so he had some concept of this world.
After Peter said to Simon, Simon repented and asked Peter and John to pray to the Lord to forgive him. So he is really repented.
The Jews didn't like people in Samaritans, but when Philip came there the Holy Spirit was with him and came upon Samaritans. The Lord loves anyone who repents from their sins.
The Holy Spirit comes upon people not by someone by money or by any human's way. it is by the Lord who gives anyone who likes.
How?
Repent and trust in Jesus, no one else can save us from sin.