Hmm maybe it's a knock off. BMW does have this bumper for our z4, it's called the aero bumper. Does yours have the aero side skirts? Is the bumper made of plastic? If it's plastic, good chance it's OEM.
They are pretty rare, though yours looks to be in a bit rubbish condition
But yeah def an OEM option from BMW. There are a few companies who made copies of this bumper and sold them cheap. Without getting a good look at yours, difficult to see if it's own or not, but as you said fitment wasn't that good, I'd say aftermarket.