Raytheon's hammer was once cursed: "Only people with autonomy can move this hammer", which means that only just and capable people can pick up the hammer, and Captain America has noble qualities, which is recognized by Raytheon's hammer, so Captain America can pick up the hammer.