It's important to remember that this launch had a very low chance of success. It was more likely that the payload would explode on the launch pad than that it would make it into space. So any time and money invested in creating a research payload would have had to be time and money someone was willing to throw away.
SpaceX's expertise is in creating launch and payload delivery systems, not in creating science packages or satellites. So someone else — likely NASA or the USAF — would have needed to step in to create the research payload at their own expense.
But this also means there would have needed to be a useful research goal achievable by fully automated equipment in deep space, and achievable for an amount of money that nobody would miss terribly if it burned up on the pad. Even if the rocket made it into space without exploding, the odds were still heavily against everything going right with the third stage boost needed to achieve a deep space trajectory, making a successful science payload delivery even less likely if it depended on being in a particular place at a particular time.
I think it's easy in hindsight to say they should have used this opportunity to launch a more useful payload, because we know that everything worked. But the fact that everything worked the first time is absolutely amazing and unprecedented in the field of rocketry. Even Elon himself said he'd be happy if the rocket just made it off the pad before exploding, and Elon is optimistic to a fault.
So instead of launching a useful payload that was almost certain to be destroyed or launched on a failed trajectory, SpaceX chose to launch a disposable payload that nobody would cry too much about if it burned up on the pad or went tumbling into the sun. Seems reasonable to me. 🙂