Investigators said the vicious attack appeared to be a random act of violence.
Richard Lawrence Kalfin, 46, was arrested on suspicion of murder following the Tuesday attack. He was being held on $1 million bail.
It appeared to be a classic case of the victim being in the wrong place at the wrong time, Los Angeles County sheriff's Lt. Eddie Hernandez told the Los Angeles Times. "There was no warning whatsoever," he said.
The store's security video shows that the assailant was in the store and had been wandering the aisles for a short time before the victim entered, Hernandez said.
At some point, the assailant ended up in the sporting goods section and removed a baseball bat from a display rack and began walking the nearby aisles, stopping only when he spotted the victim. Witnesses told authorities the suspect then repeatedly swung the bat at the victim's head until he lay dead on the floor.
There was no evidence that the two men had prior contact, Hernandez said, although he stressed that the investigation was still in its early stages.
"We express our deepest condolences to the family of this man as they grieve the loss of their loved one," Walmart said in a statement. "We are working closely with law enforcement to offer what information we have such as surveillance video that might help with the investigation."
Jennifer Thompson was one aisle over from where the beating occurred.
"It was very scary -- very, very scary, to hear the noise of someone's life being taken away," she told KCAL-TV. "Noises like moans and groans ... you could hear when he hit him. It was awful, so awful. And then I went around the corner and peeked ... and he just walked out like it was nothing."
The victim suffered head wounds and died at the scene.
It was the second violent incident at the store this year. In August, police used beanbag rounds to subdue another incoherent man who brandished two knives at a McDonald's inside the same Walmart.