"Because the state paying for only Scottish students would still be discriminatory. If I remember correctly, EU legislation about not discriminating against people from other member states is a lot wider than just "what are tuition fees" and would be really quite hard to get around. Technically at the moment Scottish students tuition fees are funded by the Young Students Bursary or the Independent Students Bursary - but we still pay it for EU students too."
You don't remember correctly. The legislation relates to the fees charged and not to different levels of support offered to students from different backgrounds/communities/municipalities. It is very common for student fees and support to vary between municipalities in, for example, Germany and the Netherlands, and a student coming to study in one municipality from elsewhere in the EU will may benefit from the low fees in one municipality (whereas students from elsewhere in the same country may pay more), but will not receive the same funding package overall.
Obviously students from elsewhere in the EU pay tuition fees at the same rate as students from Scotland, but at the moment they don't benefit from the same funding package overall. They aren't entitled to student loans and grants for maintenance, and nor are they eligible to apply for hardship funds or childcare funds that are open to Scottish students. This isn't discrimination under EU law.
"I think bursaries which are given out by, for example, charitable organisations can be discriminatory. But when you get to the position where the state is funding those on a mass scale it's a lot harder to claim it's non discriminatory." That's just your opinion really. It has no standing within the current context of higher education funding in the EU.