Batter of dosa is less uniform and mixed than that of idli. There is more water in dosa. When put on pan, water evaporates and the batter shrinks more, so holes form. IF yu have more onion chilli pieces yu find more holes.
For idli, it is steamed slowly so such shrinking does not happen. Idli not fried with oil like dosa. When idli batter is fried like dosa, you will find some holes in it too... But not as much as in dosa.