Before Bologna, all Portuguese engineering degrees with 5 years, with masters and Phd, coming on top with additional 2 and 3 years respectively.
There were exceptions like polytechnics being 4 years, but they were a small subset.
With Bologna agreement reducing the standard set of years down to 3 years, that was felt like a downgrade, and so "integrated masters" degree was born to match the original 5 year degree, and everything remains as it was.
Was it similar in UK?
This was roughly half the courses, the other half were the usual stuff like computer logic, algorithms, operative systems, databases, computer architectures , etc.
Universities probably prefer that, given all things considered, it's better to teach NP than heat transfer, because it's more related to computers? Also big tech like to ask about CS stuff in the interviews.
It was common question why we didn’t offer software engineering instead of computer science. The simple answer was an “engineering “ degree required non-applicable physical sciences, like heat transfer and an statics. Interesting, but not applicable to shipping software products.