Sacramental Baptism is necessary because it gives the SACRAMENTAL Character (hence the name: Sacramental Character- given by a sacrament:blush

and incorprates us into the Mystical Body this makes one a member of the Church. Without this character one is not a member of the Church.
Pope Pius XII, MEDIATOR DEI–On the Sacred Liturgy, 1947:#43.
"In the same way, actually that baptism is the
distinctive mark of all Christians, and serves to differentiate them from those who have not been cleansed in this purifying stream and consequently are not members of Christ."
papalencyclicals.net/Pius12/P12MEDIA.HTM
Those who would receive the theoretical “Baptism” of Desire or Blood would still not be members of the Church even if they could received Sanctifying Grace–which they can’t because there is no remission of sins outside the Church----
Pope Boniface VIII, Unam Sanctum (1302): "We are compelled in virtue of our faith to believe and maintain that there is only one holy Catholic Church, and that one is apostolic. This we firmly believe and profess without qualification. Outside this Church there is no salvation and
nor remission of sins",
papalencyclicals.net/Bon08/B8unam.htm
They that have not received the Mark/Seal of Baptism can not receive any of the other sacraments:
Pope Pius XII "On the Mystical Body of Christ,"June 29, 1943-# 18: "Through the waters of Baptism those who are born into this world dead in sin are not only born again and made members of the Church, but **being stamped with a spiritual seal **they become able and fit to receive the other Sacraments."
papalencyclicals.net/Pius12/P12MYSTI.HTM
again Sacramental Baptism is necessary for membership:
Pope Pius XII, Mystici Corporis , June 29, 1943 # 22: “Actually only those are to be numbered among the members of the Church who have received the laver of regeneration and profess the true faith.”
papalencyclicals.net/Pius12/P12MYSTI.HTM
Pope Pius XII, Mystici Corporis , June 29, 1943,# 27: “He (Christ) also determined that through Baptism (cf. Jn. 3:5) those who should believe would be incorporated in the Body of the Church.”
papalencyclicals.net/Pius12/P12MYSTI.HTM
St. Alphonsus, although a proponent of “Baptism” of Desire(BoD) and Blood (BoB), (mistakenly–His mistake is understandable because BoD/BoB wasn’t being abused as it is today to make everyone a “member of the Catholic Church”) he was honest enough to teach the traditional understanding that BoD/BoB do not incorporate one into the Church.
St Alphonsus Liguori: Moral Theology, Bk. 6, nn. 95-7.
“We shall speak below of Baptism of water, which was very probably instituted before the Passion of Christ the Lord, when Christ was baptised by John. But baptism of desire is perfect conversion to God by contrition or love of God above all things accompanied by an explicit or implicit desire for true Baptism of water, the place of which it takes as to the remission of guilt, **but not as to the impression of the [baptismal] character **or as to the removal of all debt of punishment.
Ludwig Ott agrees with Pius XII and St. Alphonsus as nearly all orthodox theologians say the same, that “The so-called Baptism by blood and Baptism of desire, it is true, replace Sacramental Baptism in so far as the communication of grace is concerned,
but do not effect incorporation into the Church , as they do not bestow the sacramental character by which a person becomes attached formally to the Church.” (Fundamentals of Catholic Dogma , p. 311.)
Even Fr. Hardon agrees:
Fr. John Hardon,THE QUESTION AND ANSWER CATECHISM::
“IS BAPTISM OF DESIRE A SACRAMENT?
Baptism of desire is not a sacrament;
i**t does not imprint the baptismal character or enable a person to receive
the other sacraments. ** Nevertheless, it does confer sanctifying grace.”
The Catholic Concise Encyclopedia , by Robert Broderick,definition of baptism
of desire goes as follows:
“In its proper meaning, this consists of an act of perfect contrition
or perfect love [that is Charity, which necessarily implies that one has the True Faith],
and the simultaneous desire for baptism.
**It does not imprint an indelible character on the soul **and
the obligation to receive Baptism by water remains.”
(From page 126 of The Catholic
Concise Encyclopedia , by Robert Broderick, M.A., copyright 1957,
Imprimatur by Francis Cardinal Spellman,
Archbishop of New York, August 31, 1956)
Sacramental Baptism is necessary for salvation because it incorporates one into the Mystical Body of Christ -His Church and makes possible the remission of sins which is impossible outside the Church (cf. see Unam Sanctum above)