148وَلِكُلٍّ وِجْهَةٌ هُوَ مُوَلِّيهَا ۖ فَٱسْتَبِقُوا۟ ٱلْخَيْرَٰتِ ۚ أَيْنَ مَا تَكُونُوا۟ يَأْتِ بِكُمُ ٱللَّهُ جَمِيعًا ۚ إِنَّ ٱللَّهَ عَلَىٰ كُلِّ شَىْءٍ قَدِيرٌ
[148] Everyone has a direction towards which he turns in Prayer: so try to excel one another in good works.149 Allah will find you wheresoever you be, for nothing is out of Allah's reach.
149There is a subtle gap between the first sentence and the second, which has been left for the reader to fill. Everyone who wants to offer his Prayer must turn his face to one or the other direction. But the real thing that matters is not the direction of the face at prayer but those virtues which are to be gained by offering the prayer. Hence the thing that really matters is the spirit and real purpose of the Prayer and not any particular direction or place.