>>18489802A Digimon is an amalgamation of data in a form relative to said data. There is no underlying rule that states a Digimon has to be a certain way; the design possibility is nearly endless.
In terms of Pokémon, they're just creatures with sapience, and do not know the difference between right and wrong; it's up to the trainer to teach them that. Digimon, however, have an alliance set by what their data dictates. If their data is centered around flowers, and people like flowers, they'll more likely become good. If their data is centered around dark places, and most people are afraid of the dark, they'll become bad.