Yes, bafokievrahms, xvimbi, andric, whynot are all very right.

As xvimbi said scales are important for the ear. In fact, for the majority of instruments, scales are essential simply to train oneself in eliciting the right pitch from the instrument. No one can play the violin, for instance without intensive and extensive scale practice
outside pieces.
The piano however, does not really require that sort of practice because one does not need to intonate the sound: the sound is already there (and out of tune, anyway, so there could even be some argument towards
not practising scales on the piano if you want to train your ears – I know that many singers advise against getting the bearings from the piano). However, the piano being a relatively recent newcomer in the instrument scene, it both profits and suffers from the accumulated wisdom of centuries of practice in other instruments. So, scale practice on the piano suffers from blind imitation of other instrument’s practice routines (if scales are good for violins and flutes, it must be good for piano too or so goes the reasoning). Not to mention the practice (and technical idiosyncrasies) heritage of the clavichord/harpsichord and fortepiano – most of which are woefully inadequate for the demands of a modern piano.
Having said that, I am not at all against the practice of scales. Quite the opposite I have said several times that as far as I am concerned, the practice of scales is essential, for all of the reasons already mentioned in the thread.
What I don’t care for is the practice of scales as some kind of mind numbing mechanical exercise for finger strength and dexterity – ultimately a waste of time and a misguided enterprise. I cannot find any benefit to be derived from sitting at a piano for 1 or 2 hours and playing scales (and arpeggios) up and down.
The real benefit of studying and practising scales is the facility in recognising keys straightaway.
But unless you aim your practice at this, you will not achieve it. I know plenty of grade 8 students who can ripple through all the 24 major and minor scales, and yet cannot spot and identify modulations in a piece.
Personally, I think that the best way to practise scales is to work on the scales of the piece one is currently learning by improvising on them. This will develop everything: musicality, improvisation, quick musical thinking, ear training, ability to transpose, you name it. Most importantly it provides a musical context for your practise that will immediately highlight where your deficiencies are so that you can concentrate on overcoming them.
I have already discussed all this before, some of it in great detail. I suggest you have a look here (to add to m1469's threads):
https://pianoforum.net/smf/index.php/topic,2429.msg21061.html#msg21061(Technical studies x pieces – the genesis of Studies and how Czerny derived his exercises from Beethoven sonatas - why scales are useless and at the same time essential – Chopin x Kalkbrenner story – Unorthodox fingering for scales).
https://pianoforum.net/smf/index.php/topic,2313.msg19807.html#msg19807(Speed of scales - important factors in speed playing - alternative fingering for scales).
https://pianoforum.net/smf/index.php/topic,2533.msg21955.html#msg21955(structured plan to learn scales and arpeggios – includes description of repeated note-groups and other tricks)
https://pianoforum.net/smf/index.php/topic,2619.msg22756.html#msg22756(complete unorthodox fingering for all major and minor scales plus explanation)
https://pianoforum.net/smf/index.php/topic,2701.msg23134.html#msg23134(Teaching scales – the cluster method and why one should start with B major).
https://pianoforum.net/smf/index.php/topic,2758.msg23889.html#msg23889(scales & compositions – the real importance of scales is to develop the concept of key, not exercise)
https://pianoforum.net/smf/index.php/topic,2920.msg25568.html#msg25568(how to play superfast scales)
https://pianoforum.net/smf/index.php/topic,2983.msg26079.html#msg26079(Best order to learn scales – what does it mean not to play scales outside pieces)
https://pianoforum.net/smf/index.php/topic,2998.msg26268.html#msg26268(Scales HT, why? – Bernhard on top form explaining why and when to practise scales HS and HT – Pragmatical x logical way of teaching – analogy with aikido – list of piano techniques – DVORAK – realistic x sports martial arts – technique and how to acquire it by solving technical problems – Hanon and why it should be avoided - Lemmings)
https://pianoforum.net/smf/index.php/topic,3499.msg31548.html#msg31548(using scales as the basis for free improvisation)
Best wishes,
Bernhard