Why is this directive to repent His first public command? Because in the work His Father sent Jesus to do, He is focused on preparing a people for the Kingdom of God. That was His job. Along with coming to pay for our sins with His own blood, He was to raise up a church, a body of believers. They would not only spread the gospel but also develop spiritually, putting on the New Man, preparing for their roles under Christ in the age to come.
The first thing those He is preparing must recognize is that they are full of sin and need to repent. To perform this cleansing properly, they must have the attitude of grieving the reality of so much sin dwelling in them. They must recognize and acknowledge that their job to rid themselves of it is beyond them; their sinfulness is impossible to overcome by themselves.
Repenting is changing the mind (metanoia). Converts must arrive at the point where they are not careless about sin. They have to change their minds to the point that they are broken up, grieved, over their sinfulness. This is the attitude of mourning Jesus encourages in the Beatitude (Matthew 5:4).
Before God's calling, we were not all that careful about sin. It did not make an impression on us as it does once God opens our eyes to the fact that we have so much of it and need to get rid of it post-haste. So, it becomes a matter of great grief to us that it exists in us in such extreme quantities and takes such a long time and so much effort to remove.
Thus, the believer's first step along the road to the Kingdom of God is to repent of his or her sins with the aid of the Savior, Jesus Christ.