To take an image, Hubble generally has to be fixated on a patch of the sky for a period of time. Just as a long exposure of the night sky can result in star trails, Hubble can capture the trails of other astronomical objects.
Sometimes software programs can be used to identify interesting elements in pictures; one such example is the software used to pick out dimming stars from exoplanet-hunting telescopes like TESS.
But for the more unusual, random elements, there's nothing better than the human eye.
This asteroid trail was actually spotted by a volunteer named Melina Thévenot from Germany, who pored through images uploaded to citizen science project Zooniverse to identify asteroids that might otherwise go unnoticed in Hubble images.
The initial image was uploaded in black-and-white; after she discovered the asteroid trail, Thévenot got to work, processing the data from Hubble's RGB filters to recreate the scene in full colour.
The asteroid itself has been known since 2001. Astronomers have identified it as 2001 SE101. It's a type of object known as a 'main belt' asteroid, orbiting the Sun in the asteroid belt between Mars and Jupiter.
NASA estimates put the number of asteroids larger than 1 kilometre (0.6 miles) in diameter as high as 1.9 million, with millions smaller than that size; yet, combined, they only make up around 4 percent of the mass of the Moon - one third of which is made up by dwarf planet Ceres.
The reason all Hubble's images taken through the Solar System's orbital plane aren't teeming with asteroids is because many of the asteroids are very small, and there's a lot of space between them.
Images that include the asteroid trails are highly valuable from a scientific perspective. Knowing the date, time and location of the image lets astronomers calculate the asteroid's past and future trajectory and velocity.
In turn, this image can help to refine our asteroid tracking techniques - which will come in handy when it comes to protecting our Earth from giant rogue space rocks.
Meanwhile, if you want to help out with one of the projects on Zooniverse, you can get started on the home page.