As you get the Yaw value as a Float, then as far as a computer is concerned then both positive and negative numbers are equally valid, and it is not uncommon in programming that things representing the same thing can be stored in different ways, and you are free to store it and compute it in the most efficient way you can.
Sometimes Yaw and Pitch are enough, and can keep things simple,
Sometimes Quaternions are more flexible allowing interpolation,
Sometimes Matrices are efficient at transforming large numbers of vectors,
Sometimes you need to go from one representation to an other for those reasons, as certain computations are easier/faster for some specific representation.