It looks like what a machinist would call a "drop" scrap piece of material because the flat end looks like it was cut in a bandsaw.
To me it looks like the piece you have was being parted/cut off in a lathe but the machinist stopped leaving the round area that you can see and then started a new place to part/cut the piece.
You can buy hexagon stock in stainless steel, brass, aluminum etc. If you had a lathe you could make a nut or a bolt out of that piece.