The people of Scotland, along with the people of Northern Ireland, and the people of London and lots and lots of people in Wales and England also, voted to remain in Europe. Scotland did not become part of the United Kingdom; England and Scotland formed the United Kingdom.
It is - to say the least - highly questionable to assert that Scotland gets more out of the Union than she puts in. The Barnett Formula does not give Scotland a higher share of public spending, just a higher share of certain parts (about half) of public sending, however, she gets very little from the other half.
Scotland nearly voted for Independence in 2015. The Scottish people voted overwhelmingly to stay in the European Union, while a majority in Great Britain voted to leave. This is likely to create further animosity between Scotland and the rest of the United Kingdom. Therefore, it is likely that Scotland will vote for independence so that the country can remain in the EU.
England has just voted to leave the European Union. The people of Scotland are not any happier with the way they have been represented in the EU than the people of England were. There is a spirit of nationalism sweeping the globe. The people of Scotland want to be their own nation again. n
There are a lot of complicated political issues surrounding Scotland and Britain's relationship. It would be hard for politicians of both sides to negotiate any kind of agreement and precedent for whether a part of a country can join or leave the union. It would have to be all or none.