The most succinct explanation is that it's simply professional ethics, with lots of good reasons behind it. In no particular order or comprehensiveness:

1. There's a long history of what is best described as stealing by archaeologists/anthropologists for museums and as a means of colonial control (e.g. looting the Benin bronzes). We want to stay far away from even the appearance of that.

2. Regardless of whether it's logical or not, people can have significant emotional identification with artifacts, sites, and remains. That's a big part of why we want to study them at all. For instance, you'd probably be offended by archaeologists walking into your yard and digging up a loved one's remains, or stealing the constitution of your country, dynamiting St. Paul's Cathedral, etc without at least asking the relevant authorities.

3. In almost all cases, we don't need any individual site or artifact. There are entire databases full of known sites we've never gotten around to excavating, due to time, budget, remoteness, or lack of research questions and people to answer them. The academic value of having one more site or artifact is typically small, while there's a huge potential for harm to an often nebulous "someone". There have been cases where this math is different because of the circumstances of a particular find(e.g. kennewick man), but these are the exception rather than the rule.

4. Artifacts are always part of a wider record, and we as a community are going to have to work with this group in the future. If people are continually feeling screwed over when we don't consider their input, they'll eventually stop helping us (providing cultural input, labor, access to other artifacts/records, land access, legal permissions, they may involve the legal system etc). There are communities where this has already happened and lack of access to them has severely limited later academic work.

5. People with a relationship to the artifacts or remains often have a valuable perspective to contribute. "Academics" (who are not a unified group either) often do better work when they consider local input, and it can help to resolve ambiguous or unclear situations. One famous example came up in what's called the Magician's tomb at Ridge Ruin, where there was an unusually rich grave that the leading archaeologist had difficulty interpreting. He brought in some Hopi (distant descendants), who were able to identify and share how some of the goods would have been used in modern times, which helped contextualize the grave and provided a starting point for future discussions.

6. It's generally considered a human rights violation if the "not asking" is egregious enough.

7. If you don't involve the locals and show them what's up, they get distrustful. This can manifest as petty thievery, destruction of excavations-in-progress, legal issues, and grave robbing.

There are probably a lot more good reasons, but this is what immediately came to mind. What NAGPRA did was establish that this basic respect was required of everyone touching native artifacts, and that while researchers could still do work that benefited scientific understanding, they had to either justify that need or consult with the affected parties. It also did some other good things like establish procedures for repatriation, which certain institutions had been notoriously slow to do for themselves.