It may be that they are restricting x to a domain on which sec(x) > 0; possibly something was said in the context that allows this.
In general, when someone asks, "Why not do this other thing?" (in this case, including the absolute value rather than dropping it), I respond "Have you tried doing that, to see what happens?". You may learn the reason, or you may find that it doesn't matter. (I haven't gone that far with this question.)