The Church believes that it is important for a baptizand (in this context also called the catechumen) to have a sponsor, for a couple of reasons. The Church considers the newly baptized to be part of the community, and the community takes part in their post-baptism catechesis. The sponsors are there at least partly to represent the community's part in the life of the newly baptized. In addition, the sponsor is a witness of the baptism, and can vouch for the fact that the baptizand is in fact part of the community of the Church.
It's for these reasons that there are the restrictions you mention on the person of the sponsor. Sponsors must stand ready before and after the baptism to help the baptizand grow as a Christian, as an individual and a member of the Catholic community.
The catechism doesn't say much about sponsors; what it does say places them in the context of the responsibility the Church as a community takes for the development of the faith of each member. Paragraph 1255 of the Catechism of the Catholic Church states:
For the grace of Baptism to unfold, the parents' help is important. So too is the role of the godfather and godmother, who must be firm believers, able and ready to help the newly baptized—child or adult—on the road of Christian life. Their task is a truly ecclesial function (officium). The whole ecclesial community bears some responsibility for the development and safeguarding of the grace given at Baptism.
Paragraph 1253 adds:
Baptism is the sacrament of faith. But faith needs the community of believers. It is only within the faith of the Church that each of the faithful can believe. The faith required for Baptism is not a perfect and mature faith, but a beginning that is called to develop. The catechumen or the godparent is asked: "What do you ask of God’s Church?" The response is: "Faith!"
The Code of Canon Law, which deals with baptismal sponsors in canons 872–874, simply reiterates that a sponsor
assists an adult in Christian initiation. ... [and] also helps the baptized person to lead a Christian life in keeping with baptism and to fulfill faithfully the obligations inherent in it.
But this task, important as it is, doesn't in itself require intimate knowledge of the personality or character of the baptizand. It requires some level of knowledge and friendship, and a Christian love; but need not require more. For this reason, it's completely appropriate for a sponsor to be someone else from the parish, even if they are not a close friend.
Canon law even anticipates that it may not be possible to find an acceptable sponsor; it does not require one absolutely:
Insofar as possible, a person to be baptized is to be given a sponsor...
However, this is (so it appears) intended to be a last resort. The Rite of Baptism for Adults does anticipate that there will be sponsors for each catechumen, and (along with the Rite of Christian Initiation of Adults generally) gives an important role to them.
The RCIA in fact appears to draw a distinction between a sponsor and a godparent—see this handbook (PDF) used by the Diocese of Columbus, Ohio, page 3-2. According to this document, the sponsor, who is present at the beginning of the process,
is a person from the community who comes to know the candidate well, who accompanies the candidate on their lifelong faith journey, and who testifies publicly in liturgical ceremonies to the candidate's moral character, faith and intention—that is, to the candidate's readiness to advance to each new step in the process.
establishes a spiritual relationship with the catechumen that lasts forever. ... A godparent upholds the catechumen in times of fear or hesitation, testifies to the catechumen's readiness, serves as a model and guides the catechumen in the Christian life.
The document states that the catechumen may select their sponsor as the godparent, but need not. The fundamental difference, though, is that the sponsor is to help the catechumen discern their readiness to enter the Catholic Church, whereas the godparent helps them (both before and after baptism) to live a Christian life and grow in faith. But at any rate it doesn't appear necessary from these descriptions that either sponsor or godparent be one who initially knows the catechumen intimately.