You are not doing anything wrong.
Pokemon are not guaranteed to make Eggs. The Pokemon you put in the Day Care have a randomised chance of producing an Egg every 255 steps, which is also known as 1 Egg Cycle. Breeding two Pokemon with the same ID number and different species is generally unlikely to produce an Egg quickly.
Assuming you caught both Ditto and Lucario in the same game (which means they'd have the same ID number), the two have a 19.8% chance of having an Egg each Egg Cycle. You can find more info on the chances on an Egg here on Bulbapedia.
I recommend riding your bike up and down Route 3. The Day Care man will call you over if he has discovered and Egg.