What is 'input id="text" used for?

I just finished the section in Basic in which I add a ‘value=“text”’ to the radio buttons and checkboxes.
In the example, they also include 'id=“text” right before the 'value=“text” in the code line. I decided not to include the id portion, and it still passed me to the next section.
So the question is, what is the id=“text” used for? Would this create problems in a real webiste?

“id” attributes can be considered optional most of the time, for most purposes. However, in some instances they’re very useful. You’ll run into those instances as you progress further into front-end development.

Most of the time it won’t cause a problem on a real website if you omit it, but you usually need the “id” attribute whenever you’re doing DOM manipulation via JavaScript. It’s not the only way to do DOM manipulation though.

Usually whenever the “id” attribute is attached to any kind of form inputs (text input, checkboxes, radio buttons, etc), it’s used via JavaScript to get or set the associated values. In that scenario, it’s perfectly valid to omit the id, but you’ll likely end up with either a partially-working or non-working form submission.

Thanks! 'ppreciate ya!