The purpose of the curtain in the temple was to keep people from coming into the presence of God. In their unholy state they could not stand in the presence of a perfectly holy God.
However, the death of Jesus changed that. He paid the price for the sins of all mankind, and therefore made it possible through his death for people to come into the presence of God.
Notice that the curtain was torn from top to bottom. This is significant because it shows that it was God’s work, not mankind’s. People cannot earn their way into God’s presence. God made it possible for us to have fellowship with him. And he did it through the death of his Son Jesus.