If salvation can't be lost why is that the Bible has lot of warnings?

If salvation can’t be lost why is that the bible has lot of warnings?

It is NOT about Losing your salvation, but about Forfeiting it, the scripture clearly teaches BOTH the sovereignty of God AND the free will of men. To deny this is irrational, and must be caused by something other than reason based on scriptural precepts.

Hebrews 6:4-6, [4] "For in the case of those who have once been enlightened and have tasted of the heavenly gift and have been made partakers of the Holy Spirit, [5] and have tasted the good scripture and the powers of the age to come, [6] and then have fallen away, it is impossible to renew them again to repentance, since they crucify to themselves the Son of God, and put Him to open shame.

This is one of the classic proof texts for forfeiting one’s salvation. Most Calvinistic theologians have made this passage fit into their theology by claiming that the passage does not refer to believers. There are, however, some significant problems with attempting to do this. First, the text clearly says, “it is impossible to renew them again to repentance”, the “them” referring to those who “have fallen away”. If the Calvinistic theologians interpretation is correct, then the text says that it is impossible for those who never actually became believers (repented, believed and thereby received the Holy Spirit), to repent and become believers. This seems to be inconsistent with God’s mercy (2 Pet. 3:9; Matt. 11:28). It also seems to contradict the entire 18th chapter of Ezekiel, particularly verses 21-23. In addition, Jesus is clearly the object of the “elementary teachings” (verses 5:11 & 6:1), so saying that this passage refers to unbelieving Jews really stretches the concept of consistent interpretation.

There are lots of examples in the Bible of those who have or who could lose their salvation.

If it can’t happen, I would ask, “Why are there all those warnings?”

i think those remind Christians who have fake faith. They should know their faith is fake.
But we do not know people’s heart, we need follow Jesus. This can make sure we can go to heaven.

These are warnings about sins; because sin has the power to broke the relationship between human and God. And salvation is about the restored relationship with God; indeed as Christians, we have been saved by Jesus. If we indulge in sins and do not repent truely, we are using our freedom to get away from God and keep broking the relationship; but God is the One of love, He would not restrict our freedom because of love.

Salvation can’t be lost. But those warnings are important. It guides us go to the right and faithful way.