Why do british people have accents but Americans don't?

Americans do, in fact, have accents; just not to other Americans from the same area. If you sound different in dialect to someone else, and pronounce words differently than others, then it's likely you have an accent; in this case, everyone in the world has an accent.