Both ideals and subrings are important in algebra. But generally there is no close relationship between congruences on $\rm\,A\,$ and subalgebras of $\rm\,A.\,$ Instead, generally congruences are related to subalgebras of the square $\rm\,A^2,\,$ e.g. see here. Rings (and groups) are special in that their congruences are determined by a single congruence class - which has the effect of collapsing the relationship of congruences with subalgebras from $\rm\,A^2\,$ down to $\rm\,A.\,$
One way to better understand the importance of ideals is to study other algebras whose congruences are determined by a single congruence class - so-called ideal determined varieties. They are characterized by two properties of congruences, being $\,0$-regular and permutable, e.g. see below for an entry point into literature on such topics.
ON SUBTRACTIVE VARIETIES IV: DEFINABILITY OF PRINCIPAL IDEALS
Paolo Agliano and Aldo Ursini
$0.\ \ $ Foreword
We have been asked the following questions:
(a) $\ $ What are ideals in universal algebra good for?
(b) $\ $ What are subtractive varieties good for?
(c) $\ $ Is there a reason to study definability of principal ideals?
Being in the middle of a project in subtractive varieties,
this seems the right place to address them.
To (a). The notion of ideal in general algebra , ,  aims
at recapturing some essential properties of the congruence classes of $0$,
for some given constant $0$. It encompasses: normal subgroups, ideals
in rings or operator groups, filters in Boolean or Heyting algebras,
ideals in Banach algebra, in l-groups and in many more classical
settings. In a sense it is a luxury, if one is satisfied with the
notion of "congruence class of $0$". Thus in part this question might
become: Why ideals in rings? Why normal subgroups in groups? Why filters
in Boolean algebras?, and many more. We do not feel like attempting any
answer to those questions. In another sense, question (a) suggests similar
questions: What are subalgebras in universal algebra good for? and many
more. Possibly, the whole enterprise called "universal algebra" is
there to answer such questions?
Having said that, it is clear that the most proper setting for a theory
of ideals is that of ideal determined classes (namely, when mapping a
congruence E to its $0$-class $\,0/E\,$ establishes a lattice isomorphism between
the congruence lattice and the ideal lattice). The first paper in this
direction  bore that in its title.
It comes out that -- for a variety $V$ -- being ideal determined is the
conjunction of two independent features:
$1$. $V$ has $0$-regular congruences, namely for any congruences $E,E'$
of any member of $V,\,$ from $\,0/E = 0/E'$ it follows $E = E'$.
$2$. $V$ has $0$-permutable congruences, namely for any congruences $E,E'$
of any member of $V,\,$ if $\ 0\, E\, y\, E'\, x,\,$ then for some $z,\ 0\, E'\, z\, E\, x$.