"Pure in heart" does not mean "sinless" perfection on earth (1 John 1:8).
Pure can mean unmixed, genuine. Blessed are those who are true disciples of Jesus Christ (one allegiance), who worship in a spirit of truth; Jesus is concerned about the core of our being. It is easy to become content with the externals (doing things) but not engaging with our hearts. Jesus gave all of himself to save all of us, fully, so we should respond the same way. If we are to be people who are pure in heart, we need to prioritize our faith in Jesus first. Seek to be sincere, transparent.
Pure can also mean clean. Clean thoughts and pure motives vs hypocrisy and wickedness.
When Jesus says this verse, it is meant as encouragement and to give us hope. When we are united in Christ, we receive all kinds of gifts. One is the gift of justification; makes us right in the eyes of the law (our debt is paid by Jesus and the Law no longer condemns us). The gift of forgiveness makes us right in terms of a relationship with God. Another gift is one of cleansing; the Spirit cleans us on a personal level (helps us deal with our bad habits, temptations, sins, and our past). John 13:6-10 Our justification cleans us before God, but living in this world we will continue to fall, so we need to come back to Him for cleansing (power to overcome sin - see the Lord's Prayer).
All of this is to prepare ourselves to see God.