Technically, you can. Practically, 4 hours is not that much time. If you're admitted to the US on arrival, you go out through the immigration and customs, and its up to you whether to turn left (connections) or right (exit), no-one forces you to go either way. I might have confused left and right, haven't been in LAX international arrivals for a while now.
You'll have to go through the security again if you exit (if I remember correctly - you'll have to go through the security either way, but I may be wrong on this).
To answer your second question: the closest Apple Store is in Manhattan Village mall, 10 minutes from LAX by cab. The closest Best Buy is one block before that, both along Sepulveda Blvd South, on your left when driving from the airport. If you're into buying electronics, then right in between there's Fry's Electronics. You can go to the mall, and walk your way back to Best Buy (10 minutes walk + stop at Fry's, beware of the time though, people tend to spend hours at Fry's:-) ), and get a cab back (call the cab ahead of time though).