I'd imagine the club might have expected Douglas Luiz to be sold for a profit with or without having played for City, and having him in la liga would have increased the exposure. They maybe wouldn't have expected the lad's qualities (and lack of available players to provide cover for dinho) to sway pep to want him among the first team as soon as last season, but its good they tried. Sends a message to other young players.
He is not the first player they would have taken a risk with re work permit, enes unal was another (sold for a healty profit, unfortunately doesnt seem to have kicked on from there) and i'm sure there will be more.
The one i dont get is roberts (whom we are officially reported to have signed for 2m, and not 12m as many papers casually throw about), showed great promise, of either moving to a prem league side for a profit or getting a shot at being around the first team, then got loaned to girona which was a step backwards. Then had contract extended and loaned again.
At the end of the day, they all count and stack up. We Know that Liverpool are able to finance all their (ALL THEIR!!) transfers with coutinho money. Yes, they sold 1 player for circa 140m. We sold 12 youth players at an average of 12m a pop, and had the same 'kitty' to work with. Liverpool obviously don't need to rely on such antics, as ALL their players are home grown, brought through the club's youth system and all from within a 30 mile radius of Anfield, so they've never had to buy in foreign stars or ever spend any money. But other big clubs do it regularly. Chelsea have been doing it for a while, with over 30 players out on loan at any given time over the last 5 seasons. Not many, if any, made it into the first team, but they probably all made the club some money. And when one does, it'll be seen as a success of the scouting system.