Limits imposed by default, but limits exist , be they server-side or client-side.
You can use a loop repetition to generate something very large and complex for the browser rendering, in addition to overloading your server, which may also hang, will reach a point where the browser will not be able to render satisfactorily and will crash, either by processing or memory usage, remember that computers do not have infinite memory, however much memory they have today.
It's like an infinite scroll page. You will notice that each scroll is heavier, it may take a little longer depending on your machine, and if you want to see clear results, load an image with each scroll.
For some bug or query error, return a table with millions of
lines and multiple columns.
Most programmers handle this error so that this does not happen, most often it is logic error, which can be fixed or detected by simply testing.
While the query returns results infinitely, they will not be displayed, just just finish running and print the result (or if you do something dynamic to display while querying). In PHP for example, you can limit the execution time of a script, if it goes into infinite loop, this would stop execution.
For the most part, when an infinite loop occurs and you have no treatment to prevent this, the client gets a 500 error.
While on the client side, when the server (in a very unlikely situation) can execute and return something absurd, they usually crash on average 90 MB, some still manage to display, but they take a long time to process.