trapz is not a "feature". It is a piece of software that embodies the trapezoidal rule, something that students may be exposed to perhaps in high school, or at least in college classes. Nothing special about it. Is that a highly accurate method? No. Can it be more accurate? Of course not. It is what it is - a very basic rule learned by students, one that is also useful for people at many levels.
(An important thing to understand about a basic rule like trapz is it is also more robust to integrating noisy data. And any data that is measured will often have some degree of noise in it too. As such trapz is often the preferred tool for many problems.)
Since we do not know the true area under those curves, we cannot be sure. All you have are sampled values.
Something we don't know is what is FitXPS is doing. Is that some sort of smoothing spline? As such, it is likely doing some serious smoothing, so it may well be greatly missing those sharp peaks.
Another important point is that you are normalizing these curves by dividing by Y(1), a location where the value is virtually tiny compared to the rest of your data. When you divide by a comparatively small number, expect accuracy to go to hell.
Anyway, how accurate is trapz here? Again, that is difficult to know, ince we don't know the true underlying function to integrate. All we have is a list of points.
spl = spline(X1,Y1/Y1(1));
I've compared it to an integral based on integrating an interpolating spline fit. your curve seems fairly smooth, so this should be pretty decent.
How close is the trapz estimate to that produced by a spline integral (which is effectively a higher order approximation to the integral)? They differ only in the 6th significant digit. If you got something that was wildly different, I would wonder what it is doing to your curve. My guess is that tool is DRAMATICALLY smoothing your curve. As such, the highly inaccurate estimate is the crap that FitXPS did to your data, not what trapz returns.
In fact, even if I try using a smoothing spline on that curve, I still get something quite close to what trapz gave. Your problem is not trapz, but whatever completely unknown thing that FitXPS is doing.