Baptism is not connected directly to faith, it is connected to the covenant God made with us. So if you get baptised, you are from then on part of the covenant between God and man, and all its promises. Baptism is therefore not evidence that you are saved, or even that you have true faith, it is merely a sign of belonging to the covenant and it's promises made therein.
Now in the OT, there was the Old covenant, where children were circumcised on about the eighth day after birth. This was to show that they was from then on part of the covenant, as decided by the parents (as ordered by God). Also, anyone that was 'added' to the covenant as a grown up also had to be circumcised.
Then, after Christ's resurrection, the Old covenant was replaced by the New covenant. See Heb 8. Also people were baptised with water as the sign that they from then on belong to the New covenant. One is therefore baptised as a baby if your parents want you to be part of the New covenant and its promises, or, if never baptised and you want to be part of the New covenant and it's promises (usually when repenting and believing), then you are baptised.
That is why the people in Acts and later, when they repented from sin and believed in Christ were baptised then, because they are part of the new covenant.
The Centurion who became a believer was baptised "with his entire family and servants". They were then all part of the covenant, though it was the Centurion who decided.