That’s how most of math works past high school. It requires a lot of practice and intuition.
I'm a math major, but I consider the time spent learning the tricks for antiderivation to be kinda useless.
Another caveat is that Risch algorithm applies only to antiderivatives, not to the definite integrals. Some definite integrals can be computed without finding the antiderivative, often with the help of Feynman's trick.