Cutting a video at a keyframe, without the slow and lossy process of decoding and re-encoding it, is only possible in the special case where you aren't applying any effects, overlays, rescaling, or anything. And where you're happy with bitrate and decoder requirements of the input. (e.g. h.264 High Profile, Level 4.0)
Perhaps fancier editting software thinks it's beneath them to detect that special case, and copy a subsection of the h.264 video and AAC audio bitstreams to a different file? (in either the same or a different container format. e.g. you could remux to mkv, or m2ts.) Or maybe you just need to look in a menu somewhere to activate that special case.
Using ffmpeg, you can do what I think you're saying Quicktime's trim is doing:
ffmpeg -ss start_offset_seconds -t length_seconds -i input.mp4 -shortest -codec copy -movflags faststart trimmed.mp4
That runs about as fast as your hard drive can copy, since it's not re-encoding the video. (codec = copy, not libx264).
To more directly answer your "how is it doing this?", google up remuxing. "mux" (short for multiplex) is the term for putting multiple streams into a single output stream/file. (1 video + 1 audio + 0 subtitles is the usual case.)