Replacing a sum with an integral can be justified, but you actually need to justify it. It looks like your textbook didn't. For example, if the function involved something like $\sin kπ$ or $\cos 2kπ$ then for integer values of k you always get a result of 0 or 1, but for real values of k the result can be all over the place, and replacing a sum with an integral would be absolutely not justified.
If you take the constant number $k^{99}$, and compare it with the integral of $x^{99}$ taken from k-1 to k, then you are integrating over values that are all less than $k^{99}$, so the integral is less. If you compare with the integral of $x^{99}$ taken from k to k+1, you are integrating over values that are all greater than $k^{99}$, so the integral is greater.
Now you are calculating the sum of $k^{99}$ for k from 1 to n. We compared each of these n numbers with an integral, so you can also compare the sum with an integral: The whole sum is larger than the integral of $x^{99}$ from 0 to n, and less than the integral from 1 to n+1. That argument would work for any function that is increasing: If a function is increasing for real x, then the sum from 1 to n is between the integral from 0 to n-1 and the integral from 1 to n.
In this case, we can calculate the integrals and find that the sum is between $n^{100}/100$ and $((n+1)^{100} - 1)/100$ which is enough to prove the limit. Your textbook just took the limit for the integral from 0 to n. That's not enough; if you had a function where taking the limit from 1 to n+1 would give a different result, it would be wrong. So that's another thing that can be justified, but must actually be justified.