In a large Dutch oven, heat oil over medium heat. Add ham hocks and cook, turning occasionally, until browned on all sides, 7 to 10 minutes. Remove from pot.
In same pot, add onion, carrot, celery, and garlic; cook, stirring occasionally, until softened, 10 to 15 minutes. Stir in broth, bay leaves, salt, and pepper. Add ham hocks; bring to a boil. Reduce heat to medium-low, cover, and cook, stirring occasionally, 20 minutes.
Stir in peas; return to a boil over medium heat. Reduce heat, cover, and cook, stirring occasionally, until peas are tender and ham shreds easily with a fork, 40 to 45 minutes.
Remove ham hocks. Shred meat, discarding bone and skin. Return ham to soup, stirring to combine. Discard bay leaves. Garnish with carrot tops, if desired.