Each fork/steerer has a spec for the height of spacers allowed. 40mm, from what I've seen, would definitely be on the high end for a carbon steerer, probably even for a metal steerer.
That said, was your bike set up this way originally? Did you put on a new fork/steerer and set it up this way without any guidance? Finally, I bet you can find the spec on line at the manufacturer's website.
I'm with you, I personally prefer a higher stack of spacers and a more horizontal, or at least not steeply angled stem.