Just playing with some new toys, quite literally.
They both lived a long time ago*, so this could have happened. There's nothing wrong with a bit of inter-species dancefloor action.
*But one in a galaxy far, far away. Although the dinosaurs were not known for their space exploration, the Empire was quite experienced at interstellar travel and certainly may have been able to visit Earth.