Have you considered that there might be methods that you are not aware of for inferring whether a region of DNA has phenotypic consequences? There’s a huge literature on this. I can’t believe you’re so arrogant as to imagine that you can just intuit the contents of that literature in a few seconds thought before writing a comment on HN.
If a section of DNA has no phenotypic consequences then that means that when we look at a sample of genomes from a population, then the stochastic process underlying the evolution of that region of the genome features random genetic drift, but natural selection is only involved via statistical associations with nearby functional regions due to limited recombination. In contrast, non-junk regions of DNA have natural selection involved directly in the stochastic process underlying their evolution. That difference gives rise to a research program where we seek to infer whether or not a region is “junk” by developing statistical models of DNA sequence evolution and fitting them to data sets comprising samples of DNA sequences from multiple individuals in a population.
That’s just one example of how the question of junk vs. non- junk is studied. There’s also comparative genomics which compares genomes of related species, taking the phylogeny into account in the analysis.
You’re not expected to know any of this; it’s evidently not your field. What is expected however, as a reader of an intelligent website such as this, is for you to understand that there might actually be an entire research field lying behind a question, and not to think that everything is so simple that you can understand it without any study at all on your part.