Basically, you get the stated cash value of the scrapping as stuff, and if you sell all the stuff you would get that much cash. So if you can’t fit all the stuff, it won’t let you do it.
Frigate missions are the same. if you don’ have enough space in your freighter to ‘offload’ all the stuff the frigates came back from the mission with, it won’t let you offload anything at all from that mission. Can be a bit of an issue when they come back with more stuff than you have freighter inventory slots 😃
Bit of a pain, but it’s a ‘fail safe’ way of doing it.