Question: why are bart and milhouse friends?
Answer: milhouse is his oldest friend. while he's a menace in school and basically the class clown/prankster, he'd never give up on a childhood friend because bart's character doesn't have that low of an ego. he's loyal to milhouse because he's his friend, not because milhouse isn't “cool” or “popular.”