Why would media_sideload_image() not work locally?

Ah, this is silly, but it turns out there was a very obvious reason why media_sideload_image() wasn’t working. My wp-content folder had the wrong the permissions from when I transferred it to my local environment and I wasn’t able to upload anything. Changed the permissions and it’s working fine.