Its for writing some custom firmware, like say if i want to write a custom driver for the 3g/2g module or write a custom USB/camera/display driver (ofcourse will have its own scheduler and all that OS type stuff for supporting the driver). JTAG would allow firmware/driver debugging. Again, no linux or a similar device framework is involved here., essentially a baremetal framework with OS like low level supporting features.
My understanding is that most SoCs have it, only they (manufacturers of SBCs) don't expose it. For e.g. all orangepi h3 boards have it, likewise raspberry pi, cubieboard, udoo, wandboard etc. these boards have functional jtag pins.