most oils can be uesd on both these days(where it states so), but its always worth buying correct oil tbh, end of the days its your engine
diesels run cooler then petrol as a known fact, this may result in the overall manufacture proccess and end product being different
for example, the oil for diesel engines may not work as well a higher temps as it doesnt need to, so may be cheaper to make that way... which would be bad news for your engine... this may not be the case, but is with most stuff these days tbh