You're never seeing "THE raw image" on your screen. What you're seeing is a conversion of the raw data into a demosaiced color image with white point, black point, white balance, contrast curves, etc. applied.
From this answer to Why and how capturing RAW image instead of JPEG helps with editing:
**Anytime you open a raw file and look at it on your screen, you are not viewing "THE raw file."**¹ You are viewing one among a
near-countless number of possible interpretations of the data in
the raw file. The raw data itself contains a single (monochrome)
brightness value measure by each pixel well. With Bayer masked camera
sensors (the vast majority of color digital cameras use Bayer filters)
each pixel well has a color filter in front of it that is either
'red', 'green', or 'blue' (the actual 'colors' of the filters in most
Bayer Masks are anywhere from a slightly yellowish-green to an
orange-yellow for 'red", a slightly yellow green for 'green' and a
slightly violet blue for 'blue' - these colors more or less
correspond to the center of sensitivity for the three types of cones
in our retinas). For a more complete discussion of how we get
color information out of the single brightness values measured at each
pixel well, please see RAW files store 3 colors per pixel, or only one?
¹ Please see: Why are my RAW images already in colour if debayering is not done yet?
In the case of ImageMagick, when you first open the image, you're almost certainly viewing the camera generated JPEG that is attached to the raw file when the photo is taken. When you convert and export, you're seeing the result of ImageMagick's processing routines applied to the raw data contained in the file. The processing algorithms the camera used and the those ImageMagick used are different. Thus the results are also different.
Since there's no single "correct" way to process and display the information in a raw image file different applications, such as ImageMagick and ufraw, will each process them slightly differently, especially with each application's default settings applied. Using different instruction sets, the results will look different.
For a more extensive look at what raw files are and what they are not, and how different processing applications will produce different results, please see:
Why and how capturing RAW image instead of JPEG helps with editing
What does an unprocessed RAW file look like?
RAW files store 3 colors per pixel, or only one?