Chief Minister Yogi Adityanath also noted that party workers and voters become careless when they feel victory is assured.
Addressing the media in Lucknow on Thursday, SP national president Akhilesh Yadav said that sometimes "past incidents have to be forgotten".
The former Uttar Pradesh chief minister, whose gamble of backing the Samajwadi Party for the bypolls in Gorakhpur and Phulpur in the state paid rich dividends, said the idea was to teach the party a lesson.
Lalu, a former Railway Minister, has also stressed on the need for unity among non-Bharatiya Janata Party leaders ahead of the 2019 Lok Sabha polls.
Singh was referring to the black chapter of UP and Mayawati's history when in 1995 the BSP chief was forced to stay in the VVIP guest house by Samajwadi Party goons after she pulled out of the ruling alliance with their party.
The former Uttar Pradesh chief minister said that people have voted in large numbers and this helped his party win bypolls.
Akhilesh Yadav, who had attributed SP's victory in Gorakhpur and Phulpur to support from BSP and some local parties, spent some at the BSP supremo's residence.
Gorakhpur was earlier held by Chief Minister Yogi Adityanath while Deputy Chief Minister Keshav Prasad Maurya had held the Phulpur seat.
A pilot project of the CIBMS is underway in two 5-km patches along the India-Pakistan border at Jammu and along the India-Bangladesh border at Dhubri in Assam.
The outcome of the by-election will be crucial, as a success for the SP-BSP experiment could pave the way for the two major players in Uttar Pradesh to tie up in the 2019 Lok Sabha elections to counter the BJP.
In a statement issued by her Bahujan Samaj Party, the former Chief Minister also demanded that the central and state governments ensure no harm comes to statues of eminent persons at various public places, including parks.