Basically, it is historical. Many of the Protestant denominations had their origins in earlier, previous Protestant sects that originally broke from Roman Catholicism at the time of the Reformation.
The Anglican (and Episcopalian) Church, the Lutheran Church, and the Calvinist or Reformed Church are the four major breaks in the sixteenth century. Later centuries experienced further subdivision of those churches (like the Methodist, Presbyterian, Congregational, and Baptist churches). The further anything gets away from its roots the more different the forms it takes. Different Protestant churches emphasize different things.
For example, Baptists highlight the baptism of adults (rather than infants or children) so that those receiving the sacrament are conscious of having already been saved. Evangelicals and Pentecostals stress the Holy Spirit and being slain in the Holy Spirit. Presbyterians, Calvinists, and Congregationalists consider preaching most important. Every Protestant denomination agrees on the importance of baptism and sees it as a sacrament.
Holy Communion or Holy Eucharist (sometimes called “The Lord’s Supper”) is also considered a sacrament by mainline Protestant denominations even though they differ greatly on the substance and effect of this sacrament. Christian marriage or matrimony is not technically called a sacrament in most non-Catholic or non-Eastern Orthodox traditions, but it is considered a holy estate and ordinance not to be ignored or disrespected. The other “Catholic” sacraments—for example, confirmation, Holy Orders, anointing of the sick, and penance (Confession)—take on just a ritual effect in the Protestant perspective. Eastern Orthodox have all seven valid sacraments.”
Many Protestant denominations have rituals that point toward, imply, or symbolize the sacraments, such as the ceremony of the Last Supper and confirmation. But their understanding of these rituals is that they are no more than symbolic or allegorical reenactments. The closer the division is to the root of Catholicism, the greater the preservation of the seven sacraments. For example, many high church Anglicans (some of whom call themselves Anglo-Catholics) claim to celebrate all seven sacraments.
While Anglicans and Catholics agree that Christ instituted seven sacraments, they will disagree on continuity and validity of the celebration of the sacraments. All mainline Christian religions have valid baptism in the eyes of the Catholic Church, hence, Protestant converts are never rebaptized unless there is a serious doubt to the matter (pouring or immersing in water) or form (pronouncing the Trinitarian baptismal formula of words).
The Catholic Church also recognizes the valid reception of Christian marriage whenever two baptized persons (a man and a woman) each enter for the first time into holy matrimony of their own free will. Yet the Catholic Church rejects the validity of the other interdenominational sacraments (confirmation, orders, etc.) based on a serious break in apostolic succession in the ordination of bishops and priests and deacons, as well as the use of substantially different words and the intention of the minister in relationship to what the Catholic Church uses and sees as necessary.
This being said, from the time of the apostles, Catholics have always believed and celebrated the seven sacraments as instituted by Jesus Christ to confer grace. All seven are rooted in Sacred Tradition and are mentioned in the Bible (Sacred Scripture): baptism (Matthew 28:18–20), confirmation (Acts 8:14–17, 9:17–19, 10:5), Eucharist (Matthew 26:26–28, Mark 14:22–25, Luke 22:7–20, John 6:25–71), penance (John 16:1–8, Matthew 16:13–19), anointing of the sick (James 5:13–16), marriage (Matthew 19:3–12), and Holy Orders (Acts 14:22–23, Hebrews 5:1–10).
They are to be seen as an organic whole which resembles the stages of natural life and spiritual life, such as sacraments of initiation, sacraments of healing, and sacraments of mission and discipleship.